aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Gumz <akira@fluxbox.org>2015-01-16 09:45:39 (GMT)
committerMathias Gumz <akira@fluxbox.org>2015-01-16 09:45:39 (GMT)
commitad8e6da8efe54e86792947285aaa5974e96d8628 (patch)
treee6c53bd5c9f21515bd5d0ed4c47b9e605d196b9b
parenta65e9c686ea8b9c029cb77d3c109f05a36bfe042 (diff)
downloadfluxbox-ad8e6da8efe54e86792947285aaa5974e96d8628.zip
fluxbox-ad8e6da8efe54e86792947285aaa5974e96d8628.tar.bz2
Make coverity happy
Coverity complaints about 'isdigit(whole_keyfile[pos])' is changing the validity of 'keyfile' (which itself is just a copy of whole_keyfile.c_str()). This might be a valid claim, it might be not. By using the 'keyfile' variable we make Coverity happy and achieve the same behavior.
-rw-r--r--util/fluxbox-update_configs.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/util/fluxbox-update_configs.cc b/util/fluxbox-update_configs.cc
index 164b073..07b7102 100644
--- a/util/fluxbox-update_configs.cc
+++ b/util/fluxbox-update_configs.cc
@@ -30,19 +30,14 @@
30#include <signal.h> 30#include <signal.h>
31#endif // HAVE_SIGNAL_H 31#endif // HAVE_SIGNAL_H
32 32
33#ifdef HAVE_CSTRING
34 #include <cstring>
35#else
36 #include <string.h>
37#endif
38
39#include <sys/stat.h> 33#include <sys/stat.h>
40 34
41#include <iostream> 35#include <iostream>
42#include <fstream> 36#include <fstream>
37#include <cstdlib>
38#include <cstring>
43#include <set> 39#include <set>
44#include <map> 40#include <map>
45#include <cstdlib>
46#include <list> 41#include <list>
47 42
48using std::cout; 43using std::cout;
@@ -364,7 +359,7 @@ void update_update_keys_file_for_nextwindow_syntax_changes(FbTk::ResourceManager
364 break; 359 break;
365 360
366 pos = whole_keyfile.find_first_not_of(" \t", pos); 361 pos = whole_keyfile.find_first_not_of(" \t", pos);
367 if (pos != std::string::npos && isdigit(whole_keyfile[pos])) { 362 if (pos != std::string::npos && isdigit(keyfile[pos])) {
368 char *endptr = 0; 363 char *endptr = 0;
369 unsigned int mask = strtoul(keyfile + pos, &endptr, 0); 364 unsigned int mask = strtoul(keyfile + pos, &endptr, 0);
370 string insert = ""; 365 string insert = "";