X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Futils_mount.c;h=f2b79439adc77e70b495cf7079a38ef18997dfbc;hb=0532336600cf2abe1d25af8fbf5ad3cf3b6b31e0;hp=afeb39e1162af515ddac44dfda578b3a76c2cdb4;hpb=a1e7183991a922b4eeca02aafaf45cd675688570;p=collectd.git diff --git a/src/utils_mount.c b/src/utils_mount.c index afeb39e1..f2b79439 100644 --- a/src/utils_mount.c +++ b/src/utils_mount.c @@ -760,13 +760,13 @@ void cu_mount_freelist (cu_mount_t *list) char * cu_mount_checkoption(char *line, char *keyword, int full) { - char *line2, *l2; - int l = strlen(keyword); - char *p1, *p2; + char *line2, *l2, *p1, *p2; + int l; if(line == NULL || keyword == NULL) { return NULL; } + if(full != 0) { full = 1; } @@ -780,6 +780,7 @@ cu_mount_checkoption(char *line, char *keyword, int full) l2++; } + l = strlen(keyword); p1 = line - 1; p2 = strchr(line, ','); do {