diff --git a/doc/CONTRIBUTORS b/doc/CONTRIBUTORS index 52357f82e..5421d9fd8 100644 --- a/doc/CONTRIBUTORS +++ b/doc/CONTRIBUTORS @@ -6,6 +6,7 @@ you believe you should be listed, please send a note to sudo@sudo.ws. Ackeret, Matt Adler, Mark Allbery, Russ + Anderson, Jamie Andrew, Nick Andric, Dimitry Barron, Danny diff --git a/plugins/sudoers/boottime.c b/plugins/sudoers/boottime.c index daa9478f3..ca489e2b6 100644 --- a/plugins/sudoers/boottime.c +++ b/plugins/sudoers/boottime.c @@ -65,8 +65,9 @@ get_boottime(struct timeval *tv) { char *line = NULL; size_t linesize = 0; + bool found = false; ssize_t len; - FILE * fp; + FILE *fp; debug_decl(get_boottime, SUDO_DEBUG_UTIL) /* read btime from /proc/stat */ @@ -78,7 +79,8 @@ get_boottime(struct timeval *tv) if (llval > 0) { tv->tv_sec = (time_t)llval; tv->tv_usec = 0; - debug_return_bool(1); + found = true; + break; } } } @@ -86,7 +88,7 @@ get_boottime(struct timeval *tv) free(line); } - debug_return_bool(0); + debug_return_bool(found); } #elif defined(HAVE_SYSCTL) && defined(KERN_BOOTTIME)