From: Christos Zoulas Date: Thu, 6 Oct 2011 14:23:31 +0000 (-0400) Subject: going_down can return; so return early if it does. X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=fc9215b4e0d05ba9bcd7a968d6fee98527cc45bd;p=am-utils-6.2.git going_down can return; so return early if it does. --- diff --git a/amd/amd.c b/amd/amd.c index fd5b7927..cd630e64 100644 --- a/amd/amd.c +++ b/amd/amd.c @@ -427,6 +427,7 @@ main(int argc, char *argv[]) if (gethostname(hostname, sizeof(hostname)) < 0) { plog(XLOG_FATAL, "gethostname: %m"); going_down(1); + return; } hostname[sizeof(hostname) - 1] = '\0'; @@ -436,6 +437,7 @@ main(int argc, char *argv[]) if (!*hostname) { plog(XLOG_FATAL, "host name is not set"); going_down(1); + return; } /* @@ -529,6 +531,7 @@ main(int argc, char *argv[]) if (geteuid() != 0) { plog(XLOG_FATAL, "Must be root to mount filesystems (euid = %ld)", (long) geteuid()); going_down(1); + return; } #ifdef HAVE_MAP_NIS @@ -540,6 +543,7 @@ main(int argc, char *argv[]) if (gopt.nis_domain && yp_bind(gopt.nis_domain)) { plog(XLOG_FATAL, "Can't bind to NIS domain \"%s\"", gopt.nis_domain); going_down(1); + return; } #endif /* HAVE_MAP_NIS */