Print this page
3244 utmpd.c: fix uninitialized variable, ret_val and other gcc warnings

*** 17,26 **** --- 17,30 ---- * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* + * Copyright 2014 Shruti V Sampat <shrutisampat@gmail.com> + */ + + /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
*** 175,186 **** /* * main() - Main does basic setup and calls wait_for_pids() to do the work */ int ! main(argc, argv) ! char **argv; { char *defp; struct rlimit rlim; int i; time_t curtime, now; --- 179,189 ---- /* * main() - Main does basic setup and calls wait_for_pids() to do the work */ int ! main(int argc, char *argv[]) { char *defp; struct rlimit rlim; int i; time_t curtime, now;
*** 347,357 **** wait_for_pids() { register struct pollfd *pfd; register int i; pid_t pid; ! int ret_val; int timeout; static time_t last_timeout = 0; static int bad_error = 0; /* Count of POLL errors */ /* --- 350,360 ---- wait_for_pids() { register struct pollfd *pfd; register int i; pid_t pid; ! int ret_val = 0; int timeout; static time_t last_timeout = 0; static int bad_error = 0; /* Count of POLL errors */ /*