From: Erez Zadok Date: Wed, 3 Aug 2005 00:01:34 +0000 (+0000) Subject: * whitespace reformatting. Remove remaining '%W%' SCCS IDs. X-Git-Tag: am-utils-6_1_1~4 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=fb5693f1a7bba316ba3adb06ed7a2a6cbb075ce3;p=am-utils-6.0.git * whitespace reformatting. Remove remaining '%W%' SCCS IDs. --- diff --git a/ChangeLog b/ChangeLog index 1b25b6d..0fad5d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2005-08-02 Erez Zadok + * whitespace reformatting. Remove remaining '%W%' SCCS IDs. + * amd/mntfs.c (free_mntfs): don't discard the last reference to an mntfs that had been mounted already. It won't have the MFF_RESTARTED flag on, as it gets turned off after the entry is diff --git a/amd/info_exec.c b/amd/info_exec.c index 0cc6dff..e726c52 100644 --- a/amd/info_exec.c +++ b/amd/info_exec.c @@ -36,9 +36,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * %W% (Berkeley) %G% * - * $Id: info_exec.c,v 1.2 2005/03/08 07:47:10 ezk Exp $ + * $Id: info_exec.c,v 1.3 2005/08/03 00:01:34 ezk Exp $ * */ @@ -276,47 +275,47 @@ exec_map_open(char *emap, char *key) return -1; } - switch((p1 = vfork())) { + switch ((p1 = vfork())) { + case -1: + /* parent: fork error */ + close(nullfd); + close(pdes[0]); + close(pdes[1]); + return -1; + case 0: + /* child #1 */ + switch ((p2 = vfork())) { case -1: - /* parent: fork error */ - close(nullfd); - close(pdes[0]); - close(pdes[1]); - return -1; + /* child #1: fork error */ + exit(errno); case 0: - /* child #1 */ - switch((p2 = vfork())) { - case -1: - /* child #1: fork error */ - exit(errno); - case 0: - /* child #2: init will reap our status */ - if (pdes[1] != STDOUT_FILENO) { - dup2(pdes[1], STDOUT_FILENO); - close(pdes[1]); - } - - if (nullfd != STDERR_FILENO) { - dup2(nullfd, STDERR_FILENO); - close(nullfd); - } - - for (i=0; i= 0) { - if(ioctl(fd, LOOP_GET_STATUS, &loopinfo) == 0) + if (ioctl(fd, LOOP_GET_STATUS, &loopinfo) == 0) someloop++; /* in use */ else if (errno == ENXIO) { close(fd); @@ -781,7 +781,7 @@ find_unused_loop_device(void) if (!somedev) { dlog("Could not find any device /dev/loop#"); - } else if(!someloop) { + } else if (!someloop) { if (loop_known == 1) { dlog("Could not find any loop device."); dlog("...Maybe /dev/loop# has a wrong major number?"); diff --git a/conf/mtab/mtab_linux.c b/conf/mtab/mtab_linux.c index cceb4d8..81675e2 100644 --- a/conf/mtab/mtab_linux.c +++ b/conf/mtab/mtab_linux.c @@ -36,9 +36,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * %W% (Berkeley) %G% * - * $Id: mtab_linux.c,v 1.3 2005/08/02 01:28:57 ezk Exp $ + * $Id: mtab_linux.c,v 1.4 2005/08/03 00:01:35 ezk Exp $ * */ diff --git a/libamu/wire.c b/libamu/wire.c index 415a1fa..2d06553 100644 --- a/libamu/wire.c +++ b/libamu/wire.c @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * - * $Id: wire.c,v 1.24 2005/06/23 20:48:42 ezk Exp $ + * $Id: wire.c,v 1.25 2005/08/03 00:01:35 ezk Exp $ * */ @@ -203,7 +203,7 @@ getwire_lookup(u_long address, u_long netmask, int ishost) */ if (!np) { u_long short_subnet = subnet; - while(short_subnet && (short_subnet & 0x000000ff) == 0) + while (short_subnet && (short_subnet & 0x000000ff) == 0) short_subnet >>= 8; np = getnetbyaddr(short_subnet, AF_INET); if (np)