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.
This commit is contained in:
Mathias Gumz 2015-01-16 10:45:39 +01:00
parent a65e9c686e
commit ad8e6da8ef

View file

@ -30,19 +30,14 @@
#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 @@ 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 = "";