From ad8e6da8efe54e86792947285aaa5974e96d8628 Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Fri, 16 Jan 2015 10:45:39 +0100 Subject: [PATCH] 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. --- util/fluxbox-update_configs.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/util/fluxbox-update_configs.cc b/util/fluxbox-update_configs.cc index 164b073f..07b71022 100644 --- a/util/fluxbox-update_configs.cc +++ b/util/fluxbox-update_configs.cc @@ -30,19 +30,14 @@ #include #endif // HAVE_SIGNAL_H -#ifdef HAVE_CSTRING - #include -#else - #include -#endif - #include #include #include +#include +#include #include #include -#include #include using std::cout; @@ -364,7 +359,7 @@ void update_update_keys_file_for_nextwindow_syntax_changes(FbTk::ResourceManager 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 = "";