/
0e2ea0c.bug
75 lines (73 loc) · 1.89 KB
/
0e2ea0c.bug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
%YAML 1.1
---
id: 0e2ea0c
title: Inefficient checking for map emptiness using size() rather than empty()
description: >
This commit performs two small performance/hygiene-related fixes
to the code, discovered using the cppcheck static analyser.
The fix replaces code that checks a std::map is empty by ensuring
its size is greater than zero with a call to "std::map::empty()".
The commit also contains a minor optimization: an argument of
the "send_any_path_command" function has been optimized to now
be passed as string by reference, rather than by value.
classification: Inefficient use of library function (no CWE)
keywords:
- cosmetic
system: mavros
severity: bad-smell
links: []
bug:
phase: build
specificity: general issue
architectural-location: N/A
application: N/A
task: N/A
subsystem: N/A
package: mavros
languages:
- C++
detected-by: code scanning tool
reported-by: unreported
issue: N/A
time-reported: unreported
reproducibility: N/A
trace: N/A
fix:
pull-request: null
fix-in:
- mavros/src/plugins/ftp.cpp
languages:
- C++
time: 2015-07-29T13:27:14+03:00
commits:
- repo: https://github.com/mavlink/mavros
hash: 0e2ea0c43b373feb490b45710fb63f4e6cde78eb
stats:
total:
insertions: 2
deletions: 2
lines: 4
files: 1
files:
mavros/src/plugins/ftp.cpp:
insertions: 2
deletions: 2
lines: 4
time-machine:
ros_distro: indigo
ros_pkgs:
- mavros
missing-dependencies:
- eigen_conversions
datetime: 2015-07-29T13:27:14+03:00
bugzoo:
is-build-failure: false
bug-commit: 9990651fe1898bc32991fbacf5afab281ba211c3
fix-commit: 0e2ea0c43b373feb490b45710fb63f4e6cde78eb
fork-urls:
- https://github.com/robust-rosin/mavros
fault-codes:
- PROGRAMMING:BAD-SMELL
- PROGRAMMING:BROKEN-CONTRACT
failure-codes:
- SYSTEM:NONE