Subject: bin/6047: egcs 1.1-revealed brace warnings for usr.sbin
To: None <gnats-bugs@gnats.netbsd.org>
From: Erik Bertelsen <erik@erik-be.uni-c.dk>
List: netbsd-bugs
Date: 08/26/1998 19:41:20
>Number:         6047
>Category:       bin
>Synopsis:       egcs 1.1-revealed brace warnings for usr.sbin
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 26 08:50:00 1998
>Last-Modified:
>Originator:     Erik Bertelsen
>Organization:
	
>Release:        NetBSD-current 26 aug 1998
>Environment:
	
System: NetBSD erik-be.uni-c.dk 1.3G NetBSD 1.3G (ERIKBE) #113: Wed Aug 26 13:34:48 MEST 1998 erik@erik-be.uni-c.dk:/sw/NetBSD/src/sys/arch/i386/compile/ERIKBE i386


>Description:
	Here are fixes for brace related warnings in usr/usr/usr.sbin
	as diagnosed by egcs 1.1.

	The following files are affected:
	Index: dumpfs/dumpfs.c
	Index: dumplfs/dumplfs.c
	Index: gspa/gspa/gsp_sym.c
	Index: ipf/ipf/parse.c
	Index: mdsetimage/mdsetimage.c
	Index: mrouted/prune.c
	Index: mtrace/mtrace.c
	Index: mtree/compare.c
	Index: mtree/create.c
	Index: mtree/verify.c
	Index: pkg_install/lib/plist.c
	Index: quotacheck/quotacheck.c
	Index: sa/pdb.c
	Index: sup/source/expand.c
	Index: sup/source/supcmeat.c
	Index: sup/source/supmsg.c
	Index: traceroute/traceroute.c
	Index: xntp/xntpd/ntp_control.c
	Index: xntp/xntpd/ntp_loopfilter.c
	Index: xntp/xntpd/ntp_refclock.c
	Index: xntp/xntpd/refclock_true.c
	Index: ypserv/ypxfr/ypxfr.c

	regards
	Erik Bertelsen
>How-To-Repeat:
>Fix:
Index: dumpfs/dumpfs.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/dumpfs/dumpfs.c,v
retrieving revision 1.1.1.6
diff -c -r1.1.1.6 dumpfs.c
*** dumpfs.c	1998/07/27 15:13:41	1.1.1.6
--- dumpfs.c	1998/08/26 17:04:07
***************
*** 127,133 ****
  	if (read(fd, &afs, SBSIZE) != SBSIZE)
  		goto err;
  
!  	if (afs.fs_magic != FS_MAGIC)
  		if (afs.fs_magic == bswap32(FS_MAGIC)) {
  			ffs_sb_swap(&afs, &afs, 0);
  			needswap = 1;
--- 127,133 ----
  	if (read(fd, &afs, SBSIZE) != SBSIZE)
  		goto err;
  
!  	if (afs.fs_magic != FS_MAGIC) {
  		if (afs.fs_magic == bswap32(FS_MAGIC)) {
  			ffs_sb_swap(&afs, &afs, 0);
  			needswap = 1;
***************
*** 136,141 ****
--- 136,142 ----
  			(void)close(fd);
   			return (1);
   		}
+  	}
  #if BYTE_ORDER == LITTLE_ENDIAN
  	if (needswap)
  #else
Index: dumplfs/dumplfs.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/dumplfs/dumplfs.c,v
retrieving revision 1.1.1.3
diff -c -r1.1.1.3 dumplfs.c
*** dumplfs.c	1998/03/03 17:49:10	1.1.1.3
--- dumplfs.c	1998/08/26 17:07:13
***************
*** 240,250 ****
  		if (i < (lfsp->lfs_segtabsz + lfsp->lfs_cleansz)) {
  			inum = dump_ipage_segusage(lfsp, inum, ipage, 
  			    lfsp->lfs_sepb);
! 			if (!inum)
  				if(!do_ientries)
  					goto e0;
  				else
  					print_iheader;
  		} else
  			inum = dump_ipage_ifile(inum, ipage, lfsp->lfs_ifpb);
  
--- 240,251 ----
  		if (i < (lfsp->lfs_segtabsz + lfsp->lfs_cleansz)) {
  			inum = dump_ipage_segusage(lfsp, inum, ipage, 
  			    lfsp->lfs_sepb);
! 			if (!inum) {
  				if(!do_ientries)
  					goto e0;
  				else
  					print_iheader;
+ 			}
  		} else
  			inum = dump_ipage_ifile(inum, ipage, lfsp->lfs_ifpb);
  
***************
*** 271,281 ****
  		if (i < lfsp->lfs_segtabsz) {
  			inum = dump_ipage_segusage(lfsp, inum, ipage, 
  			    lfsp->lfs_sepb);
! 			if (!inum)
  				if(!do_ientries)
  					goto e1;
  				else
  					print_iheader;
  		} else
  			inum = dump_ipage_ifile(inum, ipage, lfsp->lfs_ifpb);
  	}
--- 272,283 ----
  		if (i < lfsp->lfs_segtabsz) {
  			inum = dump_ipage_segusage(lfsp, inum, ipage, 
  			    lfsp->lfs_sepb);
! 			if (!inum) {
  				if(!do_ientries)
  					goto e1;
  				else
  					print_iheader;
+ 			}
  		} else
  			inum = dump_ipage_ifile(inum, ipage, lfsp->lfs_ifpb);
  	}
***************
*** 305,315 ****
  			if (i < lfsp->lfs_segtabsz) {
  				inum = dump_ipage_segusage(lfsp,
  				    inum, ipage, lfsp->lfs_sepb);
! 				if (!inum)
  					if(!do_ientries)
  						goto e2;
  					else
  						print_iheader;
  			} else
  				inum = dump_ipage_ifile(inum,
  				    ipage, lfsp->lfs_ifpb);
--- 307,318 ----
  			if (i < lfsp->lfs_segtabsz) {
  				inum = dump_ipage_segusage(lfsp,
  				    inum, ipage, lfsp->lfs_sepb);
! 				if (!inum) {
  					if(!do_ientries)
  						goto e2;
  					else
  						print_iheader;
+ 				}
  			} else
  				inum = dump_ipage_ifile(inum,
  				    ipage, lfsp->lfs_ifpb);
Index: gspa/gspa/gsp_sym.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/gspa/gspa/gsp_sym.c,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 gsp_sym.c
*** gsp_sym.c	1997/10/17 23:52:00	1.1.1.2
--- gsp_sym.c	1998/08/26 17:10:52
***************
*** 189,195 ****
  
  	for( h = 0; h < NHASH; ++h )
  		for( p = symbol_hash[h]; p != NULL; p = p->next )
! 			if( (p->flags & NUMERIC_LABEL) != 0 )
  				if( (p->flags & DEFINED) != 0 ){
  					/* a backward reference */
  					p->flags &= ~DEFINED;
--- 189,195 ----
  
  	for( h = 0; h < NHASH; ++h )
  		for( p = symbol_hash[h]; p != NULL; p = p->next )
! 			if( (p->flags & NUMERIC_LABEL) != 0 ) {
  				if( (p->flags & DEFINED) != 0 ){
  					/* a backward reference */
  					p->flags &= ~DEFINED;
***************
*** 200,203 ****
--- 200,204 ----
  					p->value = nl->value;
  					p->lineno = nl->lineno;
  				}
+ 			}
  }
Index: ipf/ipf/parse.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/ipf/ipf/parse.c,v
retrieving revision 1.1.1.10
diff -c -r1.1.1.10 parse.c
*** parse.c	1998/05/30 20:18:06	1.1.1.10
--- parse.c	1998/08/26 17:08:11
***************
*** 1164,1175 ****
  		(void)printf("block");
  		if (fp->fr_flags & FR_RETICMP) {
  			(void)printf(" return-icmp");
! 			if (fp->fr_icode)
  				if (fp->fr_icode <= MAX_ICMPCODE)
  					printf("(%s)",
  						icmpcodes[(int)fp->fr_icode]);
  				else
  					printf("(%d)", fp->fr_icode);
  		}
  		if (fp->fr_flags & FR_RETRST)
  			(void)printf(" return-rst");
--- 1164,1176 ----
  		(void)printf("block");
  		if (fp->fr_flags & FR_RETICMP) {
  			(void)printf(" return-icmp");
! 			if (fp->fr_icode) {
  				if (fp->fr_icode <= MAX_ICMPCODE)
  					printf("(%s)",
  						icmpcodes[(int)fp->fr_icode]);
  				else
  					printf("(%d)", fp->fr_icode);
+ 			}
  		}
  		if (fp->fr_flags & FR_RETRST)
  			(void)printf(" return-rst");
***************
*** 1241,1253 ****
  		else
  			(void)printf("/%d ", ones);
  	}
! 	if (fp->fr_scmp)
  		if (fp->fr_scmp == FR_INRANGE || fp->fr_scmp == FR_OUTRANGE)
  			(void)printf("port %d %s %d ", fp->fr_sport,
  				     pcmp1[fp->fr_scmp], fp->fr_stop);
  		else
  			(void)printf("port %s %s ", pcmp1[fp->fr_scmp],
  				     portname(pr, fp->fr_sport));
  
  	printf("to %s", fp->fr_flags & FR_NOTDSTIP ? "!" : "");
  	if (!fp->fr_dst.s_addr & !fp->fr_dmsk.s_addr)
--- 1242,1255 ----
  		else
  			(void)printf("/%d ", ones);
  	}
! 	if (fp->fr_scmp) {
  		if (fp->fr_scmp == FR_INRANGE || fp->fr_scmp == FR_OUTRANGE)
  			(void)printf("port %d %s %d ", fp->fr_sport,
  				     pcmp1[fp->fr_scmp], fp->fr_stop);
  		else
  			(void)printf("port %s %s ", pcmp1[fp->fr_scmp],
  				     portname(pr, fp->fr_sport));
+ 		}
  
  	printf("to %s", fp->fr_flags & FR_NOTDSTIP ? "!" : "");
  	if (!fp->fr_dst.s_addr & !fp->fr_dmsk.s_addr)
Index: mdsetimage/mdsetimage.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/mdsetimage/mdsetimage.c,v
retrieving revision 1.1.1.4
diff -c -r1.1.1.4 mdsetimage.c
*** mdsetimage.c	1997/10/17 23:52:33	1.1.1.4
--- mdsetimage.c	1998/08/26 17:12:51
***************
*** 152,162 ****
  		fprintf(stderr, "copying image from %s into %s\n", fsfile,
  		    kfile);
  	if ((rv = read(fsfd, mappedkfile + md_root_offset,
! 	    fssb.st_size)) != fssb.st_size)
  		if (rv == -1)
  			err(1, "read %s", fsfile);
  		else
  			errx(1, "unexpected EOF reading %s", fsfile);
  	if (verbose)
  		fprintf(stderr, "done copying image\n");
  	
--- 152,163 ----
  		fprintf(stderr, "copying image from %s into %s\n", fsfile,
  		    kfile);
  	if ((rv = read(fsfd, mappedkfile + md_root_offset,
! 	    fssb.st_size)) != fssb.st_size) {
  		if (rv == -1)
  			err(1, "read %s", fsfile);
  		else
  			errx(1, "unexpected EOF reading %s", fsfile);
+ 	}
  	if (verbose)
  		fprintf(stderr, "done copying image\n");
  	
Index: mrouted/prune.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/mrouted/prune.c,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 prune.c
*** prune.c	1997/10/17 23:53:11	1.1.1.2
--- prune.c	1998/08/26 17:15:52
***************
*** 1781,1791 ****
  	    if (gt->gt_pruntbl != NULL || gt->gt_srctbl != NULL ||
  		gt->gt_prsent_timer > 0) {
  		gt->gt_timer = CACHE_LIFETIME(cache_lifetime);
! 		if (gt->gt_prsent_timer == -1)
  		    if (gt->gt_grpmems == 0)
  			send_prune(gt);
  		    else
  			gt->gt_prsent_timer = 0;
  		gtnptr = &gt->gt_gnext;
  		continue;
  	    }
--- 1781,1792 ----
  	    if (gt->gt_pruntbl != NULL || gt->gt_srctbl != NULL ||
  		gt->gt_prsent_timer > 0) {
  		gt->gt_timer = CACHE_LIFETIME(cache_lifetime);
! 		if (gt->gt_prsent_timer == -1) {
  		    if (gt->gt_grpmems == 0)
  			send_prune(gt);
  		    else
  			gt->gt_prsent_timer = 0;
+ 		}
  		gtnptr = &gt->gt_gnext;
  		continue;
  	    }
***************
*** 1818,1828 ****
  #endif /* RSRR */
  	    free((char *)gt);
  	} else {
! 	    if (gt->gt_prsent_timer == -1)
  		if (gt->gt_grpmems == 0)
  		    send_prune(gt);
  		else
  		    gt->gt_prsent_timer = 0;
  	    gtnptr = &gt->gt_gnext;
  	}
      }
--- 1819,1830 ----
  #endif /* RSRR */
  	    free((char *)gt);
  	} else {
! 	    if (gt->gt_prsent_timer == -1) {
  		if (gt->gt_grpmems == 0)
  		    send_prune(gt);
  		else
  		    gt->gt_prsent_timer = 0;
+ 	    }
  	    gtnptr = &gt->gt_gnext;
  	}
      }
***************
*** 2208,2219 ****
  	    resp->tr_rflags = TR_SCOPED;
  	else if (gt->gt_prsent_timer)
  	    resp->tr_rflags = TR_PRUNED;
! 	else if (!VIFM_ISSET(vifi, gt->gt_grpmems))
  	    if (VIFM_ISSET(vifi, rt->rt_children) &&
  		!VIFM_ISSET(vifi, rt->rt_leaves))
  		resp->tr_rflags = TR_OPRUNED;
  	    else
  		resp->tr_rflags = TR_NO_FWD;
      } else {
  	if (scoped_addr(vifi, group))
  	    resp->tr_rflags = TR_SCOPED;
--- 2210,2222 ----
  	    resp->tr_rflags = TR_SCOPED;
  	else if (gt->gt_prsent_timer)
  	    resp->tr_rflags = TR_PRUNED;
! 	else if (!VIFM_ISSET(vifi, gt->gt_grpmems)) {
  	    if (VIFM_ISSET(vifi, rt->rt_children) &&
  		!VIFM_ISSET(vifi, rt->rt_leaves))
  		resp->tr_rflags = TR_OPRUNED;
  	    else
  		resp->tr_rflags = TR_NO_FWD;
+ 	}
      } else {
  	if (scoped_addr(vifi, group))
  	    resp->tr_rflags = TR_SCOPED;
Index: mtrace/mtrace.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/mtrace/mtrace.c,v
retrieving revision 1.1.1.5
diff -c -r1.1.1.5 mtrace.c
*** mtrace.c	1998/07/05 17:43:39	1.1.1.5
--- mtrace.c	1998/08/26 17:25:11
***************
*** 1596,1602 ****
  
      if (base.rtime == 0) {
  	printf("Timed out receiving responses\n");
! 	if (IN_MULTICAST(ntohl(tdst)))
  	  if (tdst == query_cast)
  	    printf("Perhaps no local router has a route for source %s\n",
  		   inet_fmt(qsrc, s1));
--- 1596,1602 ----
  
      if (base.rtime == 0) {
  	printf("Timed out receiving responses\n");
! 	if (IN_MULTICAST(ntohl(tdst))) {
  	  if (tdst == query_cast)
  	    printf("Perhaps no local router has a route for source %s\n",
  		   inet_fmt(qsrc, s1));
***************
*** 1606,1611 ****
--- 1606,1612 ----
  or multicast at ttl %d doesn't reach its last-hop router for that source\n",
  		   inet_fmt(qdst, s2), inet_fmt(qgrp, s3), inet_fmt(qsrc, s1),
  		   qttl ? qttl : MULTICAST_TTL1);
+ 	}
  	exit(1);
      }
  
Index: mtree/compare.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/mtree/compare.c,v
retrieving revision 1.1.1.5
diff -c -r1.1.1.5 compare.c
*** compare.c	1998/01/14 11:25:57	1.1.1.5
--- compare.c	1998/08/26 17:17:13
***************
*** 205,211 ****
  			tab = "\t";
  		}
  	}
! 	if (s->flags & F_CKSUM)
  		if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0) {
  			LABEL;
  			(void)printf("%scksum: %s: %s\n",
--- 205,211 ----
  			tab = "\t";
  		}
  	}
! 	if (s->flags & F_CKSUM) {
  		if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0) {
  			LABEL;
  			(void)printf("%scksum: %s: %s\n",
***************
*** 226,231 ****
--- 226,232 ----
  			}
  			tab = "\t";
  		}
+ 	}
  	if (s->flags & F_SLINK && strcmp(cp = rlink(name), s->slink)) {
  		LABEL;
  		(void)printf("%slink ref (%s, %s)\n", tab, cp, s->slink);
Index: mtree/create.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/mtree/create.c,v
retrieving revision 1.1.1.4
diff -c -r1.1.1.4 create.c
*** create.c	1998/07/06 14:32:28	1.1.1.4
--- create.c	1998/08/26 17:17:45
***************
*** 143,158 ****
  
  	if (!S_ISREG(p->fts_statp->st_mode))
  		output(&indent, "type=%s", inotype(p->fts_statp->st_mode));
! 	if (keys & (F_UID | F_UNAME) && p->fts_statp->st_uid != uid)
  		if (keys & F_UNAME && (pw = getpwuid(p->fts_statp->st_uid)))
  			output(&indent, "uname=%s", pw->pw_name);
  		else /* if (keys & F_UID) */
  			output(&indent, "uid=%u", p->fts_statp->st_uid);
! 	if (keys & (F_GID | F_GNAME) && p->fts_statp->st_gid != gid)
  		if (keys & F_GNAME && (gr = getgrgid(p->fts_statp->st_gid)))
  			output(&indent, "gname=%s", gr->gr_name);
  		else /* if (keys & F_GID) */
  			output(&indent, "gid=%u", p->fts_statp->st_gid);
  	if (keys & F_MODE && (p->fts_statp->st_mode & MBITS) != mode)
  		output(&indent, "mode=%#o", p->fts_statp->st_mode & MBITS);
  	if (keys & F_NLINK && p->fts_statp->st_nlink != 1)
--- 143,160 ----
  
  	if (!S_ISREG(p->fts_statp->st_mode))
  		output(&indent, "type=%s", inotype(p->fts_statp->st_mode));
! 	if (keys & (F_UID | F_UNAME) && p->fts_statp->st_uid != uid) {
  		if (keys & F_UNAME && (pw = getpwuid(p->fts_statp->st_uid)))
  			output(&indent, "uname=%s", pw->pw_name);
  		else /* if (keys & F_UID) */
  			output(&indent, "uid=%u", p->fts_statp->st_uid);
! 	}
! 	if (keys & (F_GID | F_GNAME) && p->fts_statp->st_gid != gid) {
  		if (keys & F_GNAME && (gr = getgrgid(p->fts_statp->st_gid)))
  			output(&indent, "gname=%s", gr->gr_name);
  		else /* if (keys & F_GID) */
  			output(&indent, "gid=%u", p->fts_statp->st_gid);
+ 	}
  	if (keys & F_MODE && (p->fts_statp->st_mode & MBITS) != mode)
  		output(&indent, "mode=%#o", p->fts_statp->st_mode & MBITS);
  	if (keys & F_NLINK && p->fts_statp->st_nlink != 1)
***************
*** 233,248 ****
  	(void)printf("/set type=file");
  	if (keys & F_GID)
  		(void)printf(" gid=%u", savegid);
! 	if (keys & F_GNAME)
  		if ((gr = getgrgid(savegid)) != NULL)
  			(void)printf(" gname=%s", gr->gr_name);
  		else
  			(void)printf(" gid=%u", savegid);
! 	if (keys & F_UNAME)
  		if ((pw = getpwuid(saveuid)) != NULL)
  			(void)printf(" uname=%s", pw->pw_name);
  		else
  			(void)printf(" uid=%u", saveuid);
  	if (keys & F_UID)
  		(void)printf(" uid=%u", saveuid);
  	if (keys & F_MODE)
--- 235,252 ----
  	(void)printf("/set type=file");
  	if (keys & F_GID)
  		(void)printf(" gid=%u", savegid);
! 	if (keys & F_GNAME) {
  		if ((gr = getgrgid(savegid)) != NULL)
  			(void)printf(" gname=%s", gr->gr_name);
  		else
  			(void)printf(" gid=%u", savegid);
! 	}
! 	if (keys & F_UNAME) {
  		if ((pw = getpwuid(saveuid)) != NULL)
  			(void)printf(" uname=%s", pw->pw_name);
  		else
  			(void)printf(" uid=%u", saveuid);
+ 	}
  	if (keys & F_UID)
  		(void)printf(" uid=%u", saveuid);
  	if (keys & F_MODE)
Index: mtree/verify.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/mtree/verify.c,v
retrieving revision 1.1.1.4
diff -c -r1.1.1.4 verify.c
*** verify.c	1997/10/17 23:53:19	1.1.1.4
--- verify.c	1998/08/26 17:18:08
***************
*** 174,180 ****
  		}
  
  		create = 0;
! 		if (!(p->flags & F_VISIT) && uflag)
  			if (!(p->flags & (F_UID | F_UNAME)))
  			    (void)printf(" (not created: user not specified)");
  			else if (!(p->flags & (F_GID | F_GNAME)))
--- 174,180 ----
  		}
  
  		create = 0;
! 		if (!(p->flags & F_VISIT) && uflag) {
  			if (!(p->flags & (F_UID | F_UNAME)))
  			    (void)printf(" (not created: user not specified)");
  			else if (!(p->flags & (F_GID | F_GNAME)))
***************
*** 188,193 ****
--- 188,194 ----
  				create = 1;
  				(void)printf(" (created)");
  			}
+ 		}
  
  		if (!(p->flags & F_VISIT))
  			(void)putchar('\n');
Index: pkg_install/lib/plist.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/pkg_install/lib/plist.c,v
retrieving revision 1.1.1.7
diff -c -r1.1.1.7 plist.c
*** plist.c	1998/06/06 17:49:12	1.1.1.7
--- plist.c	1998/08/26 17:18:36
***************
*** 507,517 ****
  	    *cp2 = '\0';
  	if (!isemptydir(dir))
  	    return 0;
! 	if (RMDIR(dir) && !ign_err)
  	    if (!fexists(dir))
  		warnx("directory `%s' doesn't really exist", dir);
  	    else
  		return 1;
  	/* back up the pathname one component */
  	if (cp2) {
  	    cp1 = dir;
--- 507,518 ----
  	    *cp2 = '\0';
  	if (!isemptydir(dir))
  	    return 0;
! 	if (RMDIR(dir) && !ign_err) {
  	    if (!fexists(dir))
  		warnx("directory `%s' doesn't really exist", dir);
  	    else
  		return 1;
+ 	}
  	/* back up the pathname one component */
  	if (cp2) {
  	    cp1 = dir;
Index: quotacheck/quotacheck.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/quotacheck/quotacheck.c,v
retrieving revision 1.1.1.5
diff -c -r1.1.1.5 quotacheck.c
*** quotacheck.c	1998/07/27 15:13:53	1.1.1.5
--- quotacheck.c	1998/08/26 17:20:29
***************
*** 293,305 ****
  	sync();
  	dev_bsize = 1;
  	bread(SBOFF, (char *)&sblock, (long)SBSIZE);
! 	if (sblock.fs_magic != FS_MAGIC)
  		if (sblock.fs_magic== bswap32(FS_MAGIC)) {
  			needswap = 1;
  			ffs_sb_swap(&sblock, &sblock, 0);
  		} else
  			errx(1, "%s: superblock magic number 0x%x, not 0x%x",
  				fsname, sblock.fs_magic, FS_MAGIC);
  	dev_bsize = sblock.fs_fsize / fsbtodb(&sblock, 1);
  	maxino = sblock.fs_ncg * sblock.fs_ipg;
  	resetinodebuf();
--- 293,306 ----
  	sync();
  	dev_bsize = 1;
  	bread(SBOFF, (char *)&sblock, (long)SBSIZE);
! 	if (sblock.fs_magic != FS_MAGIC) {
  		if (sblock.fs_magic== bswap32(FS_MAGIC)) {
  			needswap = 1;
  			ffs_sb_swap(&sblock, &sblock, 0);
  		} else
  			errx(1, "%s: superblock magic number 0x%x, not 0x%x",
  				fsname, sblock.fs_magic, FS_MAGIC);
+ 	}
  	dev_bsize = sblock.fs_fsize / fsbtodb(&sblock, 1);
  	maxino = sblock.fs_ncg * sblock.fs_ipg;
  	resetinodebuf();
Index: sa/pdb.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/sa/pdb.c,v
retrieving revision 1.1.1.3
diff -c -r1.1.1.3 pdb.c
*** pdb.c	1997/10/19 17:57:33	1.1.1.3
--- pdb.c	1998/08/26 17:22:59
***************
*** 401,411 ****
  		}
  	}
  
! 	if (tflag)
  		if (!uflow)
  			printf("%8.2fre/cp ", cip->ci_etime / (double) (cip->ci_utime + cip->ci_stime));
  		else
  			printf("%8s ", "*ignore*");
  
  	if (Dflag)
  		printf("%10qutio ", (unsigned long long)cip->ci_io);
--- 401,412 ----
  		}
  	}
  
! 	if (tflag) {
  		if (!uflow)
  			printf("%8.2fre/cp ", cip->ci_etime / (double) (cip->ci_utime + cip->ci_stime));
  		else
  			printf("%8s ", "*ignore*");
+ 	}
  
  	if (Dflag)
  		printf("%10qutio ", (unsigned long long)cip->ci_io);
Index: sup/source/expand.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/sup/source/expand.c,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 expand.c
*** expand.c	1997/10/20 22:57:30	1.1.1.2
--- expand.c	1998/08/26 17:27:56
***************
*** 336,346 ****
  				if (addpath(*s++)) goto pathovfl;
  			if (addpath('/')) goto pathovfl;
  			if (stat(fixit(path), &stb) >= 0 &&
! 			    (stb.st_mode&S_IFMT) == S_IFDIR)
  				if (*p == 0)
  					addone(path, "");
  				else
  					glob(p);
  pathovfl:
  			pathp = spathp;
  			*pathp = 0;
--- 336,347 ----
  				if (addpath(*s++)) goto pathovfl;
  			if (addpath('/')) goto pathovfl;
  			if (stat(fixit(path), &stb) >= 0 &&
! 			    (stb.st_mode&S_IFMT) == S_IFDIR) {
  				if (*p == 0)
  					addone(path, "");
  				else
  					glob(p);
+ 			}
  pathovfl:
  			pathp = spathp;
  			*pathp = 0;
Index: sup/source/supcmeat.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/sup/source/supcmeat.c,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 supcmeat.c
*** supcmeat.c	1997/10/20 22:57:31	1.1.1.2
--- supcmeat.c	1998/08/26 17:28:57
***************
*** 564,570 ****
  		   changed on the server but the timestamp is right, we do an
  		   update.  (Update refers to updating stat information, i.e.
  		   timestamp, owner, mode bits, etc.) */
! 		if (exists && (sbuf.st_mode&S_IFMT) == (t->Tmode&S_IFMT))
  			if (!S_ISREG(t->Tmode))
  				if (t->Tflags&FNEW)
  					fetch = FALSE;
--- 564,570 ----
  		   changed on the server but the timestamp is right, we do an
  		   update.  (Update refers to updating stat information, i.e.
  		   timestamp, owner, mode bits, etc.) */
! 		if (exists && (sbuf.st_mode&S_IFMT) == (t->Tmode&S_IFMT)) {
  			if (!S_ISREG(t->Tmode))
  				if (t->Tflags&FNEW)
  					fetch = FALSE;
***************
*** 572,581 ****
  			else if ((thisC->Cflags&CFKEEP) &&
  				 sbuf.st_mtime > t->Tmtime)
  				return (SCMOK);
! 			else if (sbuf.st_mtime == t->Tmtime)
  				if (t->Tflags&FNEW)
  					fetch = FALSE;
  				else return (SCMOK);
  	}
  	/* If we get this far, we're either doing an update or a full fetch. */
  	newt = Tinsert (&needT,t->Tname,TRUE);
--- 572,583 ----
  			else if ((thisC->Cflags&CFKEEP) &&
  				 sbuf.st_mtime > t->Tmtime)
  				return (SCMOK);
! 			else if (sbuf.st_mtime == t->Tmtime) {
  				if (t->Tflags&FNEW)
  					fetch = FALSE;
  				else return (SCMOK);
+ 			}
+ 		}
  	}
  	/* If we get this far, we're either doing an update or a full fetch. */
  	newt = Tinsert (&needT,t->Tname,TRUE);
***************
*** 1475,1485 ****
  		goawayreason = NULL;
  	va_end(ap);
  	(void) msggoaway ();
! 	if (fmt)
  		if (thisC)
  			notify ("SUP: %s\n",buf);
  		else
  			printf ("SUP: %s\n",buf);
  	if (!dontjump)
  		longjmp (sjbuf,TRUE);
  }
--- 1477,1488 ----
  		goawayreason = NULL;
  	va_end(ap);
  	(void) msggoaway ();
! 	if (fmt) {
  		if (thisC)
  			notify ("SUP: %s\n",buf);
  		else
  			printf ("SUP: %s\n",buf);
+ 	}
  	if (!dontjump)
  		longjmp (sjbuf,TRUE);
  }
Index: sup/source/supmsg.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/sup/source/supmsg.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 supmsg.c
*** supmsg.c	1997/10/09 08:26:06	1.1.1.1
--- supmsg.c	1998/08/26 17:27:31
***************
*** 156,166 ****
  		if (x == SCMOK)  x = readint (&baseino);
  		if (x == SCMOK)  x = readint (&listonly);
  		if (x == SCMOK)  x = readint (&newonly);
! 		if (x == SCMOK)
  			if (protver < 6)
  				release = (char *)NULL;
  			else
  				x = readstring (&release);
  		if (x == SCMOK)  x = readmend ();
  	} else {
  		x = writemsg (MSGSETUP);
--- 156,167 ----
  		if (x == SCMOK)  x = readint (&baseino);
  		if (x == SCMOK)  x = readint (&listonly);
  		if (x == SCMOK)  x = readint (&newonly);
! 		if (x == SCMOK) {
  			if (protver < 6)
  				release = (char *)NULL;
  			else
  				x = readstring (&release);
+ 		}
  		if (x == SCMOK)  x = readmend ();
  	} else {
  		x = writemsg (MSGSETUP);
Index: traceroute/traceroute.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/traceroute/traceroute.c,v
retrieving revision 1.1.1.11
diff -c -r1.1.1.11 traceroute.c
*** traceroute.c	1998/07/18 23:36:52	1.1.1.11
--- traceroute.c	1998/08/26 17:29:54
***************
*** 1061,1067 ****
  	    packlen, 0, &whereto, sizeof(whereto));
  #endif
  	if (cc < 0 || cc != packlen)  {
! 		if (cc < 0)
  			/*
  			 * An errno of EMSGSIZE means we're writing too big a
  			 * datagram for the interface.  We have to just decrease
--- 1061,1067 ----
  	    packlen, 0, &whereto, sizeof(whereto));
  #endif
  	if (cc < 0 || cc != packlen)  {
! 		if (cc < 0) {
  			/*
  			 * An errno of EMSGSIZE means we're writing too big a
  			 * datagram for the interface.  We have to just decrease
***************
*** 1081,1086 ****
--- 1081,1087 ----
  			} else
  				Fprintf(stderr, "%s: sendto: %s\n",
  				    prog, strerror(errno));
+ 		}
  		
  		Printf("%s: wrote %s %d chars, ret=%d\n",
  		    prog, hostname, packlen, cc);
Index: xntp/xntpd/ntp_control.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/xntp/xntpd/ntp_control.c,v
retrieving revision 1.1.1.5
diff -c -r1.1.1.5 ntp_control.c
*** ntp_control.c	1998/08/13 18:18:48	1.1.1.5
--- ntp_control.c	1998/08/26 17:35:10
***************
*** 1610,1622 ****
  			    clock->fudgeval1);
  		break;
  	case CC_FUDGEVAL2:
! 		if (mustput || (clock->haveflags & CLK_HAVEVAL2))
  			if (clock->fudgeval1 > 1)
  				ctl_putadr(clock_var[CC_FUDGEVAL2].text,
  				    clock->fudgeval2);
  			else
  				ctl_putid(clock_var[CC_FUDGEVAL2].text,
  				    (char *)&clock->fudgeval2);
  		break;
  	case CC_FLAGS:
  		if (mustput || (clock->haveflags &
--- 1610,1623 ----
  			    clock->fudgeval1);
  		break;
  	case CC_FUDGEVAL2:
! 		if (mustput || (clock->haveflags & CLK_HAVEVAL2)) {
  			if (clock->fudgeval1 > 1)
  				ctl_putadr(clock_var[CC_FUDGEVAL2].text,
  				    clock->fudgeval2);
  			else
  				ctl_putid(clock_var[CC_FUDGEVAL2].text,
  				    (char *)&clock->fudgeval2);
+ 		}
  		break;
  	case CC_FLAGS:
  		if (mustput || (clock->haveflags &
Index: xntp/xntpd/ntp_loopfilter.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/xntp/xntpd/ntp_loopfilter.c,v
retrieving revision 1.1.1.4
diff -c -r1.1.1.4 ntp_loopfilter.c
*** ntp_loopfilter.c	1998/08/13 18:18:51	1.1.1.4
--- ntp_loopfilter.c	1998/08/26 17:34:27
***************
*** 719,732 ****
  			msyslog(LOG_ERR,
  			    "sigaction() fails to restore SIGSYS trap: %m");
  #endif /* SIGSYS */
! 		if (pll_control)
  			NLOG(NLOG_SYSEVENT)	/* conditional syslog */
  			    msyslog(LOG_NOTICE,
  			    "using kernel phase-lock loop %04x", ntv.status);
! 		else
  			NLOG(NLOG_SYSEVENT)	/* conditional syslog */
  			    msyslog(LOG_NOTICE,
  			    "using xntpd phase-lock loop");
  #endif /* KERNEL_PLL */
  		break;
  
--- 719,733 ----
  			msyslog(LOG_ERR,
  			    "sigaction() fails to restore SIGSYS trap: %m");
  #endif /* SIGSYS */
! 		if (pll_control) {
  			NLOG(NLOG_SYSEVENT)	/* conditional syslog */
  			    msyslog(LOG_NOTICE,
  			    "using kernel phase-lock loop %04x", ntv.status);
! 		} else {
  			NLOG(NLOG_SYSEVENT)	/* conditional syslog */
  			    msyslog(LOG_NOTICE,
  			    "using xntpd phase-lock loop");
+ 		}
  #endif /* KERNEL_PLL */
  		break;
  
Index: xntp/xntpd/ntp_refclock.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/xntp/xntpd/ntp_refclock.c,v
retrieving revision 1.1.1.5
diff -c -r1.1.1.5 ntp_refclock.c
*** ntp_refclock.c	1998/08/13 18:18:54	1.1.1.5
--- ntp_refclock.c	1998/08/26 17:33:36
***************
*** 156,167 ****
  		pp->currentstatus = code;
  		pp->lastevent = code;
  
! 		if (code == CEVNT_FAULT)
  		    NLOG(NLOG_CLOCKEVENT)
  		      msyslog(LOG_ERR,
  			     "clock %s fault '%s' (0x%02x)",
  			     refnumtoa(peer->srcadr.sin_addr.s_addr), ceventstr(code), code);
! 		else {
  		    NLOG(NLOG_CLOCKEVENT)
  		      msyslog(LOG_INFO,
  			     "clock %s event '%s' (0x%02x)",
--- 156,167 ----
  		pp->currentstatus = code;
  		pp->lastevent = code;
  
! 		if (code == CEVNT_FAULT) {
  		    NLOG(NLOG_CLOCKEVENT)
  		      msyslog(LOG_ERR,
  			     "clock %s fault '%s' (0x%02x)",
  			     refnumtoa(peer->srcadr.sin_addr.s_addr), ceventstr(code), code);
! 		} else {
  		    NLOG(NLOG_CLOCKEVENT)
  		      msyslog(LOG_INFO,
  			     "clock %s event '%s' (0x%02x)",
Index: xntp/xntpd/refclock_true.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/xntp/xntpd/refclock_true.c,v
retrieving revision 1.1.1.4
diff -c -r1.1.1.4 refclock_true.c
*** refclock_true.c	1998/08/13 18:19:12	1.1.1.4
--- refclock_true.c	1998/08/26 17:31:07
***************
*** 226,232 ****
  
  	want_debugging = (pp->sloppyclockflag & CLK_FLAG2) != 0;
  	now_debugging = (up->debug != NULL);
! 	if (want_debugging != now_debugging)
  		if (want_debugging) {
  			char filename[20];
  
--- 226,232 ----
  
  	want_debugging = (pp->sloppyclockflag & CLK_FLAG2) != 0;
  	now_debugging = (up->debug != NULL);
! 	if (want_debugging != now_debugging) {
  		if (want_debugging) {
  			char filename[20];
  
***************
*** 244,249 ****
--- 244,250 ----
  			fclose(up->debug);
  			up->debug = NULL;
  		}
+ 	}
  
  	if (up->debug) {
  		fprintf(up->debug, "true%d: ", up->unit);
Index: ypserv/ypxfr/ypxfr.c
===================================================================
RCS file: /sw/cvs-base/src/usr.sbin/ypserv/ypxfr/ypxfr.c,v
retrieving revision 1.1.1.5
diff -c -r1.1.1.5 ypxfr.c
*** ypxfr.c	1997/10/14 01:31:37	1.1.1.5
--- ypxfr.c	1998/08/26 17:35:46
***************
*** 375,385 ****
  
  	status = yp_order_host(client, domain, map, (int *)rordernum);
  
! 	if (status == 0)
  		if (*rordernum <= lordernum)
  			status = YPPUSH_AGE;
  		else
  			status = YPPUSH_SUCC;
  
  	return status;
  }
--- 375,386 ----
  
  	status = yp_order_host(client, domain, map, (int *)rordernum);
  
! 	if (status == 0) {
  		if (*rordernum <= lordernum)
  			status = YPPUSH_AGE;
  		else
  			status = YPPUSH_SUCC;
+ 	}
  
  	return status;
  }
>Audit-Trail:
>Unformatted: