Date: Fri, 15 Apr 2016 22:31:22 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298089 - in head: sbin/dump sbin/fsck_ffs sbin/ifconfig sbin/mount_nfs usr.bin/bsdiff/bsdiff usr.bin/bsdiff/bspatch usr.bin/calendar usr.bin/rpcgen usr.bin/showmount usr.bin/sort usr.b... Message-ID: <201604152231.u3FMVMad008972@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Fri Apr 15 22:31:22 2016 New Revision: 298089 URL: https://svnweb.freebsd.org/changeset/base/298089 Log: Cleanup unnecessary semicolons from utilities we all love. Modified: head/sbin/dump/optr.c head/sbin/fsck_ffs/globs.c head/sbin/ifconfig/sfp.c head/sbin/mount_nfs/mount_nfs.c head/usr.bin/bsdiff/bsdiff/bsdiff.c head/usr.bin/bsdiff/bspatch/bspatch.c head/usr.bin/calendar/dates.c head/usr.bin/calendar/io.c head/usr.bin/rpcgen/rpc_cout.c head/usr.bin/rpcgen/rpc_main.c head/usr.bin/rpcgen/rpc_parse.c head/usr.bin/rpcgen/rpc_svcout.c head/usr.bin/rpcgen/rpc_util.c head/usr.bin/showmount/showmount.c head/usr.bin/sort/bwstring.c head/usr.bin/sort/coll.c head/usr.bin/sort/file.c head/usr.bin/truss/syscalls.c head/usr.bin/xlint/lint1/func.c head/usr.bin/xstr/xstr.c head/usr.sbin/keyserv/keyserv.c head/usr.sbin/lmcconfig/lmcconfig.c head/usr.sbin/mountd/mountd.c head/usr.sbin/nfscbd/nfscbd.c head/usr.sbin/nfsd/nfsd.c head/usr.sbin/pmcstudy/pmcstudy.c head/usr.sbin/portsnap/phttpget/phttpget.c head/usr.sbin/ppp/radius.c Modified: head/sbin/dump/optr.c ============================================================================== --- head/sbin/dump/optr.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/sbin/dump/optr.c Fri Apr 15 22:31:22 2016 (r298089) @@ -403,7 +403,7 @@ lastdump(int arg) /* w ==> just what to dumpme = tnow > (dtwalk->dd_ddate - (tlast->tm_hour * 3600) - (tlast->tm_min * 60) - tlast->tm_sec + (dt->fs_freq * 86400)); - }; + } if (arg != 'w' || dumpme) (void) printf( "%c %8s\t(%6s) Last dump: Level %d, Date %s\n", Modified: head/sbin/fsck_ffs/globs.c ============================================================================== --- head/sbin/fsck_ffs/globs.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/sbin/fsck_ffs/globs.c Fri Apr 15 22:31:22 2016 (r298089) @@ -118,7 +118,7 @@ fsckinit(void) bzero(totalreadcnt, sizeof(long) * BT_NUMBUFTYPES); bzero(readtime, sizeof(struct timespec) * BT_NUMBUFTYPES); bzero(totalreadtime, sizeof(struct timespec) * BT_NUMBUFTYPES); - bzero(&startprog, sizeof(struct timespec));; + bzero(&startprog, sizeof(struct timespec)); bzero(&sblk, sizeof(struct bufarea)); pdirbp = NULL; pbp = NULL; Modified: head/sbin/ifconfig/sfp.c ============================================================================== --- head/sbin/ifconfig/sfp.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/sbin/ifconfig/sfp.c Fri Apr 15 22:31:22 2016 (r298089) @@ -911,6 +911,6 @@ sfp_status(int s, struct ifreq *ifr, int break; default: print_sfp_status(&ii, verbose); - }; + } } Modified: head/sbin/mount_nfs/mount_nfs.c ============================================================================== --- head/sbin/mount_nfs/mount_nfs.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/sbin/mount_nfs/mount_nfs.c Fri Apr 15 22:31:22 2016 (r298089) @@ -1027,7 +1027,7 @@ xdr_fh(XDR *xdrsp, struct nfhret *np) if (!authfnd && (authcnt > 0 || np->auth != AUTH_SYS)) np->stat = EAUTH; return (1); - }; + } return (0); } Modified: head/usr.bin/bsdiff/bsdiff/bsdiff.c ============================================================================== --- head/usr.bin/bsdiff/bsdiff/bsdiff.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.bin/bsdiff/bsdiff/bsdiff.c Fri Apr 15 22:31:22 2016 (r298089) @@ -57,24 +57,24 @@ static void split(off_t *I,off_t *V,off_ if(V[I[k+i]+h]<x) { x=V[I[k+i]+h]; j=0; - }; + } if(V[I[k+i]+h]==x) { tmp=I[k+j];I[k+j]=I[k+i];I[k+i]=tmp; j++; - }; - }; + } + } for(i=0;i<j;i++) V[I[k+i]]=k+j-1; if(j==1) I[k]=-1; - }; + } return; - }; + } x=V[I[start+len/2]+h]; jj=0;kk=0; for(i=start;i<start+len;i++) { if(V[I[i]+h]<x) jj++; if(V[I[i]+h]==x) kk++; - }; + } jj+=start;kk+=jj; i=start;j=0;k=0; @@ -87,8 +87,8 @@ static void split(off_t *I,off_t *V,off_ } else { tmp=I[i];I[i]=I[kk+k];I[kk+k]=tmp; k++; - }; - }; + } + } while(jj+j<kk) { if(V[I[jj+j]+h]==x) { @@ -96,8 +96,8 @@ static void split(off_t *I,off_t *V,off_ } else { tmp=I[jj+j];I[jj+j]=I[kk+k];I[kk+k]=tmp; k++; - }; - }; + } + } if(jj>start) split(I,V,start,jj-start,h); @@ -137,10 +137,10 @@ static void qsufsort(off_t *I,off_t *V,u split(I,V,i,len,h); i+=len; len=0; - }; - }; + } + } if(len) I[i-len]=-len; - }; + } for(i=0;i<oldsize+1;i++) I[V[i]]=i; } @@ -171,7 +171,7 @@ static off_t search(off_t *I,u_char *old *pos=I[en]; return y; } - }; + } x=st+(en-st)/2; if(memcmp(old+I[x],new,MIN(oldsize-I[x],newsize))<0) { @@ -321,24 +321,24 @@ int main(int argc,char *argv[]) if((scan+lastoffset<oldsize) && (old[scan+lastoffset] == new[scan])) oldscore--; - }; + } if((len!=oldscore) || (scan==newsize)) { s=0;Sf=0;lenf=0; for(i=0;(lastscan+i<scan)&&(lastpos+i<oldsize);) { if(old[lastpos+i]==new[lastscan+i]) s++; i++; - if(s*2-i>Sf*2-lenf) { Sf=s; lenf=i; }; - }; + if(s*2-i>Sf*2-lenf) { Sf=s; lenf=i; } + } lenb=0; if(scan<newsize) { s=0;Sb=0; for(i=1;(scan>=lastscan+i)&&(pos>=i);i++) { if(old[pos-i]==new[scan-i]) s++; - if(s*2-i>Sb*2-lenb) { Sb=s; lenb=i; }; - }; - }; + if(s*2-i>Sb*2-lenb) { Sb=s; lenb=i; } + } + } if(lastscan+lenf>scan-lenb) { overlap=(lastscan+lenf)-(scan-lenb); @@ -348,12 +348,12 @@ int main(int argc,char *argv[]) old[lastpos+lenf-overlap+i]) s++; if(new[scan-lenb+i]== old[pos-lenb+i]) s--; - if(s>Ss) { Ss=s; lens=i+1; }; - }; + if(s>Ss) { Ss=s; lens=i+1; } + } lenf+=lens-overlap; lenb-=lens; - }; + } for(i=0;i<lenf;i++) db[dblen+i]=new[lastscan+i]-old[lastpos+i]; @@ -381,8 +381,8 @@ int main(int argc,char *argv[]) lastscan=scan-lenb; lastpos=pos-lenb; lastoffset=pos-scan; - }; - }; + } + } BZ2_bzWriteClose(&bz2err, pfbz2, 0, NULL, NULL); if (bz2err != BZ_OK) errx(1, "BZ2_bzWriteClose, bz2err = %d", bz2err); Modified: head/usr.bin/bsdiff/bspatch/bspatch.c ============================================================================== --- head/usr.bin/bsdiff/bspatch/bspatch.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.bin/bsdiff/bspatch/bspatch.c Fri Apr 15 22:31:22 2016 (r298089) @@ -161,7 +161,7 @@ int main(int argc,char * argv[]) (cbz2err != BZ_STREAM_END))) errx(1, "Corrupt patch\n"); ctrl[i]=offtin(buf); - }; + } /* Sanity-check */ if(newpos+ctrl[0]>newsize) @@ -195,7 +195,7 @@ int main(int argc,char * argv[]) /* Adjust pointers */ newpos+=ctrl[1]; oldpos+=ctrl[2]; - }; + } /* Clean up the bzip2 reads */ BZ2_bzReadClose(&cbz2err, cpfbz2); Modified: head/usr.bin/calendar/dates.c ============================================================================== --- head/usr.bin/calendar/dates.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.bin/calendar/dates.c Fri Apr 15 22:31:22 2016 (r298089) @@ -381,7 +381,7 @@ walkthrough_dates(struct event **e) d = m->days; *e = d->events; return (1); - }; + } if (d->nextday != NULL) { d = d->nextday; *e = d->events; Modified: head/usr.bin/calendar/io.c ============================================================================== --- head/usr.bin/calendar/io.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.bin/calendar/io.c Fri Apr 15 22:31:22 2016 (r298089) @@ -469,7 +469,7 @@ closecal(FILE *fp) if (setuid(getuid()) < 0) { warnx("setuid failed"); _exit(1); - }; + } if (setgid(getegid()) < 0) { warnx("setgid failed"); _exit(1); Modified: head/usr.bin/rpcgen/rpc_cout.c ============================================================================== --- head/usr.bin/rpcgen/rpc_cout.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.bin/rpcgen/rpc_cout.c Fri Apr 15 22:31:22 2016 (r298089) @@ -81,7 +81,7 @@ emit(definition *def) if (strcmp(def->def.ty.old_type, def->def_name) == 0) return; - }; + } print_header(def); switch (def->def_kind) { case DEF_UNION: Modified: head/usr.bin/rpcgen/rpc_main.c ============================================================================== --- head/usr.bin/rpcgen/rpc_main.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.bin/rpcgen/rpc_main.c Fri Apr 15 22:31:22 2016 (r298089) @@ -977,7 +977,7 @@ checkfiles(const char *infile, const cha { warn("%s", infile); crash(); - }; + } if (outfile) { if (stat(outfile, &buf) < 0) return; /* file does not exist */ Modified: head/usr.bin/rpcgen/rpc_parse.c ============================================================================== --- head/usr.bin/rpcgen/rpc_parse.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.bin/rpcgen/rpc_parse.c Fri Apr 15 22:31:22 2016 (r298089) @@ -329,7 +329,7 @@ def_union(definition *defp) *tailp = cases; tailp = &cases->next; cases = XALLOC(case_list); - }; + } get_declaration(&dec, DEF_UNION); cases->case_decl = dec; Modified: head/usr.bin/rpcgen/rpc_svcout.c ============================================================================== --- head/usr.bin/rpcgen/rpc_svcout.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.bin/rpcgen/rpc_svcout.c Fri Apr 15 22:31:22 2016 (r298089) @@ -551,7 +551,7 @@ write_program(definition *def, const cha (void) sprintf(_errbuf, "unable to free results"); print_err_message("\t\t"); f_print(fout, "\n"); - }; + } print_return("\t"); f_print(fout, "}\n"); } Modified: head/usr.bin/rpcgen/rpc_util.c ============================================================================== --- head/usr.bin/rpcgen/rpc_util.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.bin/rpcgen/rpc_util.c Fri Apr 15 22:31:22 2016 (r298089) @@ -454,7 +454,7 @@ add_type(int len, const char *type) { typ_list_t->next = ptr; typ_list_t = ptr; - }; + } } @@ -470,7 +470,7 @@ find_type(const char *type) return (ptr); else ptr = ptr->next; - }; + } return (NULL); } Modified: head/usr.bin/showmount/showmount.c ============================================================================== --- head/usr.bin/showmount/showmount.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.bin/showmount/showmount.c Fri Apr 15 22:31:22 2016 (r298089) @@ -194,7 +194,7 @@ main(int argc, char **argv) default: printf("Hosts on %s:\n", host); break; - }; + } print_dump(mntdump); } if (rpcs & DOEXPORTS) { @@ -317,7 +317,7 @@ xdr_mntdump(XDR *xdrsp, struct mountlist goto next; } break; - }; + } if (val < 0) { otp = &tp->ml_left; tp = tp->ml_left; @@ -407,7 +407,7 @@ print_dump(struct mountlist *mp) default: printf("%s\n", mp->ml_host); break; - }; + } if (mp->ml_right) print_dump(mp->ml_right); } Modified: head/usr.bin/sort/bwstring.c ============================================================================== --- head/usr.bin/sort/bwstring.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.bin/sort/bwstring.c Fri Apr 15 22:31:22 2016 (r298089) @@ -297,7 +297,7 @@ bwscsbdup(const unsigned char *str, size /* NOTREACHED */ err(2, "mbrtowc error"); cptr += charlen; - }; + } } ret->len = chars; Modified: head/usr.bin/sort/coll.c ============================================================================== --- head/usr.bin/sort/coll.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.bin/sort/coll.c Fri Apr 15 22:31:22 2016 (r298089) @@ -688,7 +688,7 @@ static void setsuffix(wchar_t c, unsigne break; default: *si = 0; - }; + } } /* Modified: head/usr.bin/sort/file.c ============================================================================== --- head/usr.bin/sort/file.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.bin/sort/file.c Fri Apr 15 22:31:22 2016 (r298089) @@ -1258,7 +1258,7 @@ sort_list_to_file(struct sort_list *list break; default: errx(2, "%s", getstr(10)); - }; + } } if (sort_opts_vals.sort_method == SORT_DEFAULT) Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.bin/truss/syscalls.c Fri Apr 15 22:31:22 2016 (r298089) @@ -1197,7 +1197,7 @@ print_arg(struct syscall_args *sc, unsig break; len--; truncated = 1; - }; + } fprintf(fp, "\"%s\"%s", tmp3, truncated ? "..." : ""); free(tmp3); Modified: head/usr.bin/xlint/lint1/func.c ============================================================================== --- head/usr.bin/xlint/lint1/func.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.bin/xlint/lint1/func.c Fri Apr 15 22:31:22 2016 (r298089) @@ -517,7 +517,7 @@ label(int typ, sym_t *sym, tnode_t *tn) ci->c_default = 1; } break; - }; + } reached = 1; } Modified: head/usr.bin/xstr/xstr.c ============================================================================== --- head/usr.bin/xstr/xstr.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.bin/xstr/xstr.c Fri Apr 15 22:31:22 2016 (r298089) @@ -139,7 +139,7 @@ main(int argc, char *argv[]) argc--, argv++; else readstd = 0; - }; + } flushsh(); if (cflg == 0) xsdotc(); Modified: head/usr.sbin/keyserv/keyserv.c ============================================================================== --- head/usr.sbin/keyserv/keyserv.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.sbin/keyserv/keyserv.c Fri Apr 15 22:31:22 2016 (r298089) @@ -440,7 +440,7 @@ key_net_put_2_svc_prog(uid, arg) arg->st_netname, (int)sizeof (arg->st_pub_key), arg->st_pub_key, (int)sizeof (arg->st_priv_key), arg->st_priv_key); - }; + } status = pk_netput(uid, arg); Modified: head/usr.sbin/lmcconfig/lmcconfig.c ============================================================================== --- head/usr.sbin/lmcconfig/lmcconfig.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.sbin/lmcconfig/lmcconfig.c Fri Apr 15 22:31:22 2016 (r298089) @@ -1528,7 +1528,7 @@ print_test_pattern(int patt) case 11: printf("framed X^23+X^18+1\n"); break; - case 12:; + case 12: printf("framed X^11+X^9+1 w/7ZS\n"); break; case 13: Modified: head/usr.sbin/mountd/mountd.c ============================================================================== --- head/usr.sbin/mountd/mountd.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.sbin/mountd/mountd.c Fri Apr 15 22:31:22 2016 (r298089) @@ -434,7 +434,7 @@ main(int argc, char **argv) break; default: usage(); - }; + } if (modfind("nfsd") < 0) { /* Not present in kernel, try loading it */ @@ -1241,7 +1241,7 @@ xdr_fhs(XDR *xdrsp, caddr_t cp) return (0); return (xdr_long(xdrsp, &auth)); } - }; + } return (0); } @@ -2540,7 +2540,7 @@ do_mount(struct exportlist *ep, struct g *cp = savedc; ret = 1; goto error_exit; - }; + } /* * For V4:, use the nfssvc() syscall, instead of mount(). Modified: head/usr.sbin/nfscbd/nfscbd.c ============================================================================== --- head/usr.sbin/nfscbd/nfscbd.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.sbin/nfscbd/nfscbd.c Fri Apr 15 22:31:22 2016 (r298089) @@ -177,7 +177,7 @@ main(int argc, char *argv[]) default: case '?': usage(); - }; + } argv += optind; argc -= optind; Modified: head/usr.sbin/nfsd/nfsd.c ============================================================================== --- head/usr.sbin/nfsd/nfsd.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.sbin/nfsd/nfsd.c Fri Apr 15 22:31:22 2016 (r298089) @@ -214,7 +214,7 @@ main(int argc, char **argv) default: case '?': usage(); - }; + } if (!tcpflag && !udpflag) udpflag = 1; argv += optind; Modified: head/usr.sbin/pmcstudy/pmcstudy.c ============================================================================== --- head/usr.sbin/pmcstudy/pmcstudy.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.sbin/pmcstudy/pmcstudy.c Fri Apr 15 22:31:22 2016 (r298089) @@ -2873,7 +2873,7 @@ main(int argc, char **argv) printf("-A -- Run all canned tests\n"); return(0); break; - }; + } } if ((run_all == 0) && (name == NULL) && (filename == NULL) && (test_mode == 0) && (master_exp == NULL)) { Modified: head/usr.sbin/portsnap/phttpget/phttpget.c ============================================================================== --- head/usr.sbin/portsnap/phttpget/phttpget.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.sbin/portsnap/phttpget/phttpget.c Fri Apr 15 22:31:22 2016 (r298089) @@ -598,7 +598,7 @@ main(int argc, char *argv[]) fd = open(fname, O_CREAT | O_TRUNC | O_WRONLY, 0644); if (fd == -1) errx(1, "open(%s)", fname); - }; + } /* Read the message and send data to fd if appropriate */ if (chunked) { Modified: head/usr.sbin/ppp/radius.c ============================================================================== --- head/usr.sbin/ppp/radius.c Fri Apr 15 21:31:40 2016 (r298088) +++ head/usr.sbin/ppp/radius.c Fri Apr 15 22:31:22 2016 (r298089) @@ -1150,7 +1150,7 @@ radius_Account(struct radius *r, struct snprintf(ac->multi_session_id, sizeof ac->multi_session_id, "%s", dl->bundle->ncp.mp.active ? dl->bundle->ncp.mp.server.socket.sun_path : ""); - }; + } if (rad_put_string(r->cx.rad, RAD_USER_NAME, ac->user_name) != 0 || rad_put_int(r->cx.rad, RAD_SERVICE_TYPE, RAD_FRAMED) != 0 ||
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604152231.u3FMVMad008972>