=== modified file 'plugin-runner.c' --- plugin-runner.c 2011-12-25 00:40:09 +0000 +++ plugin-runner.c 2011-12-25 10:33:25 +0000 @@ -426,7 +426,7 @@ errno = 0; switch(key){ char *tmp; - intmax_t tmpmax; + intmax_t tmp_id; case 'g': /* --global-options */ { char *plugin_option; @@ -505,24 +505,24 @@ /* This is already done by parse_opt_config_file() */ break; case 130: /* --userid */ - tmpmax = strtoimax(arg, &tmp, 10); + tmp_id = strtoimax(arg, &tmp, 10); if(errno != 0 or tmp == arg or *tmp != '\0' - or tmpmax != (uid_t)tmpmax){ + or tmp_id != (uid_t)tmp_id){ argp_error(state, "Bad user ID number: \"%s\", using %" PRIdMAX, arg, (intmax_t)uid); break; } - uid = (uid_t)tmpmax; + uid = (uid_t)tmp_id; break; case 131: /* --groupid */ - tmpmax = strtoimax(arg, &tmp, 10); + tmp_id = strtoimax(arg, &tmp, 10); if(errno != 0 or tmp == arg or *tmp != '\0' - or tmpmax != (gid_t)tmpmax){ + or tmp_id != (gid_t)tmp_id){ argp_error(state, "Bad group ID number: \"%s\", using %" PRIdMAX, arg, (intmax_t)gid); break; } - gid = (gid_t)tmpmax; + gid = (gid_t)tmp_id; break; case 132: /* --debug */ debug = true; === modified file 'plugins.d/password-prompt.c' --- plugins.d/password-prompt.c 2011-12-25 00:40:09 +0000 +++ plugins.d/password-prompt.c 2011-12-25 10:33:25 +0000 @@ -124,13 +124,13 @@ int ret; int cl_fd; { - uintmax_t maxvalue; + uintmax_t proc_id; char *tmp; errno = 0; - maxvalue = strtoumax(proc_entry->d_name, &tmp, 10); + proc_id = strtoumax(proc_entry->d_name, &tmp, 10); if(errno != 0 or *tmp != '\0' - or maxvalue != (uintmax_t)((pid_t)maxvalue)){ + or proc_id != (uintmax_t)((pid_t)proc_id)){ return 0; } } @@ -514,6 +514,7 @@ switch(e){ case EBADF: status = EX_UNAVAILABLE; + break; case EIO: case EINVAL: default: === modified file 'plugins.d/plymouth.c' --- plugins.d/plymouth.c 2011-12-25 00:40:09 +0000 +++ plugins.d/plymouth.c 2011-12-25 10:33:25 +0000 @@ -218,13 +218,13 @@ int is_plymouth(const struct dirent *proc_entry){ int ret; { - uintmax_t maxvalue; + uintmax_t proc_id; char *tmp; errno = 0; - maxvalue = strtoumax(proc_entry->d_name, &tmp, 10); + proc_id = strtoumax(proc_entry->d_name, &tmp, 10); if(errno != 0 or *tmp != '\0' - or maxvalue != (uintmax_t)((pid_t)maxvalue)){ + or proc_id != (uintmax_t)((pid_t)proc_id)){ return 0; } } @@ -265,36 +265,36 @@ pid_t get_pid(void){ int ret; - uintmax_t maxvalue = 0; + uintmax_t proc_id = 0; FILE *pidfile = fopen(plymouth_pid, "r"); /* Try the new pid file location */ if(pidfile != NULL){ - ret = fscanf(pidfile, "%" SCNuMAX, &maxvalue); + ret = fscanf(pidfile, "%" SCNuMAX, &proc_id); if(ret != 1){ - maxvalue = 0; + proc_id = 0; } fclose(pidfile); } /* Try the old pid file location */ - if(maxvalue == 0){ + if(proc_id == 0){ pidfile = fopen(plymouth_pid, "r"); if(pidfile != NULL){ - ret = fscanf(pidfile, "%" SCNuMAX, &maxvalue); + ret = fscanf(pidfile, "%" SCNuMAX, &proc_id); if(ret != 1){ - maxvalue = 0; + proc_id = 0; } fclose(pidfile); } } /* Look for a plymouth process */ - if(maxvalue == 0){ + if(proc_id == 0){ struct dirent **direntries = NULL; ret = scandir("/proc", &direntries, is_plymouth, alphasort); if (ret == -1){ error_plus(0, errno, "scandir"); } if (ret > 0){ - ret = sscanf(direntries[0]->d_name, "%" SCNuMAX, &maxvalue); + ret = sscanf(direntries[0]->d_name, "%" SCNuMAX, &proc_id); if (ret < 0){ error_plus(0, errno, "sscanf"); } @@ -304,8 +304,8 @@ free(direntries); } pid_t pid; - pid = (pid_t)maxvalue; - if((uintmax_t)pid == maxvalue){ + pid = (pid_t)proc_id; + if((uintmax_t)pid == proc_id){ return pid; }