1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

coverity: fix cppcheck warnings

/lib/log/log.c:88: warning[invalidScanfArgType_int]: %llu in format string (no. 2) requires 'unsigned long long *' but the argument type is 'long long *'.
daemons/lvmlockd/lvmlockd-core.c:791: error[uninitstring]: Dangerous usage of 'version' (strncpy doesn't always null-terminate it).
This commit is contained in:
Peter Rajnoha 2015-08-04 09:33:55 +02:00
parent 46e6b2b86e
commit 83541123c8
2 changed files with 2 additions and 1 deletions

View File

@ -787,6 +787,7 @@ int version_from_args(char *args, unsigned int *major, unsigned int *minor, unsi
char *n, *d1, *d2;
strncpy(version, args, MAX_ARGS);
version[MAX_ARGS] = '\0';
n = strstr(version, ":");
if (n)

View File

@ -69,7 +69,7 @@ void init_log_file(const char *log_file, int append)
static const char statfile[] = "/proc/self/stat";
const char *env;
int pid;
long long starttime;
unsigned long long starttime;
FILE *st;
int i = 0;