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.
Mathias Gumz akira@fluxbox.org
1 files changed,
3 insertions(+),
8 deletions(-)
jump to
M
util/fluxbox-update_configs.cc
→
util/fluxbox-update_configs.cc
@@ -30,19 +30,14 @@ #ifdef HAVE_SIGNAL_H
#include <signal.h> #endif // HAVE_SIGNAL_H -#ifdef HAVE_CSTRING - #include <cstring> -#else - #include <string.h> -#endif - #include <sys/stat.h> #include <iostream> #include <fstream> +#include <cstdlib> +#include <cstring> #include <set> #include <map> -#include <cstdlib> #include <list> using std::cout;@@ -364,7 +359,7 @@ if (pos == old_pos)
break; pos = whole_keyfile.find_first_not_of(" \t", pos); - if (pos != std::string::npos && isdigit(whole_keyfile[pos])) { + if (pos != std::string::npos && isdigit(keyfile[pos])) { char *endptr = 0; unsigned int mask = strtoul(keyfile + pos, &endptr, 0); string insert = "";