Cleanup unnecessary semicolons from utilities we all love.

This commit is contained in:
pfg 2016-04-15 22:31:22 +00:00
parent 838cf0e4a7
commit 26c891f034
28 changed files with 58 additions and 58 deletions

View File

@ -403,7 +403,7 @@ lastdump(int arg) /* w ==> just what to do; W ==> most recent dumps */
dumpme = tnow > (dtwalk->dd_ddate - (tlast->tm_hour * 3600) dumpme = tnow > (dtwalk->dd_ddate - (tlast->tm_hour * 3600)
- (tlast->tm_min * 60) - tlast->tm_sec - (tlast->tm_min * 60) - tlast->tm_sec
+ (dt->fs_freq * 86400)); + (dt->fs_freq * 86400));
}; }
if (arg != 'w' || dumpme) if (arg != 'w' || dumpme)
(void) printf( (void) printf(
"%c %8s\t(%6s) Last dump: Level %d, Date %s\n", "%c %8s\t(%6s) Last dump: Level %d, Date %s\n",

View File

@ -118,7 +118,7 @@ fsckinit(void)
bzero(totalreadcnt, sizeof(long) * BT_NUMBUFTYPES); bzero(totalreadcnt, sizeof(long) * BT_NUMBUFTYPES);
bzero(readtime, sizeof(struct timespec) * BT_NUMBUFTYPES); bzero(readtime, sizeof(struct timespec) * BT_NUMBUFTYPES);
bzero(totalreadtime, 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)); bzero(&sblk, sizeof(struct bufarea));
pdirbp = NULL; pdirbp = NULL;
pbp = NULL; pbp = NULL;

View File

@ -911,6 +911,6 @@ sfp_status(int s, struct ifreq *ifr, int verbose)
break; break;
default: default:
print_sfp_status(&ii, verbose); print_sfp_status(&ii, verbose);
}; }
} }

View File

@ -1027,7 +1027,7 @@ xdr_fh(XDR *xdrsp, struct nfhret *np)
if (!authfnd && (authcnt > 0 || np->auth != AUTH_SYS)) if (!authfnd && (authcnt > 0 || np->auth != AUTH_SYS))
np->stat = EAUTH; np->stat = EAUTH;
return (1); return (1);
}; }
return (0); return (0);
} }

View File

@ -57,24 +57,24 @@ static void split(off_t *I,off_t *V,off_t start,off_t len,off_t h)
if(V[I[k+i]+h]<x) { if(V[I[k+i]+h]<x) {
x=V[I[k+i]+h]; x=V[I[k+i]+h];
j=0; j=0;
}; }
if(V[I[k+i]+h]==x) { if(V[I[k+i]+h]==x) {
tmp=I[k+j];I[k+j]=I[k+i];I[k+i]=tmp; tmp=I[k+j];I[k+j]=I[k+i];I[k+i]=tmp;
j++; j++;
}; }
}; }
for(i=0;i<j;i++) V[I[k+i]]=k+j-1; for(i=0;i<j;i++) V[I[k+i]]=k+j-1;
if(j==1) I[k]=-1; if(j==1) I[k]=-1;
}; }
return; return;
}; }
x=V[I[start+len/2]+h]; x=V[I[start+len/2]+h];
jj=0;kk=0; jj=0;kk=0;
for(i=start;i<start+len;i++) { for(i=start;i<start+len;i++) {
if(V[I[i]+h]<x) jj++; if(V[I[i]+h]<x) jj++;
if(V[I[i]+h]==x) kk++; if(V[I[i]+h]==x) kk++;
}; }
jj+=start;kk+=jj; jj+=start;kk+=jj;
i=start;j=0;k=0; i=start;j=0;k=0;
@ -87,8 +87,8 @@ static void split(off_t *I,off_t *V,off_t start,off_t len,off_t h)
} else { } else {
tmp=I[i];I[i]=I[kk+k];I[kk+k]=tmp; tmp=I[i];I[i]=I[kk+k];I[kk+k]=tmp;
k++; k++;
}; }
}; }
while(jj+j<kk) { while(jj+j<kk) {
if(V[I[jj+j]+h]==x) { if(V[I[jj+j]+h]==x) {
@ -96,8 +96,8 @@ static void split(off_t *I,off_t *V,off_t start,off_t len,off_t h)
} else { } else {
tmp=I[jj+j];I[jj+j]=I[kk+k];I[kk+k]=tmp; tmp=I[jj+j];I[jj+j]=I[kk+k];I[kk+k]=tmp;
k++; k++;
}; }
}; }
if(jj>start) split(I,V,start,jj-start,h); if(jj>start) split(I,V,start,jj-start,h);
@ -137,10 +137,10 @@ static void qsufsort(off_t *I,off_t *V,u_char *old,off_t oldsize)
split(I,V,i,len,h); split(I,V,i,len,h);
i+=len; i+=len;
len=0; len=0;
}; }
}; }
if(len) I[i-len]=-len; if(len) I[i-len]=-len;
}; }
for(i=0;i<oldsize+1;i++) I[V[i]]=i; 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,off_t oldsize,
*pos=I[en]; *pos=I[en];
return y; return y;
} }
}; }
x=st+(en-st)/2; x=st+(en-st)/2;
if(memcmp(old+I[x],new,MIN(oldsize-I[x],newsize))<0) { 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) && if((scan+lastoffset<oldsize) &&
(old[scan+lastoffset] == new[scan])) (old[scan+lastoffset] == new[scan]))
oldscore--; oldscore--;
}; }
if((len!=oldscore) || (scan==newsize)) { if((len!=oldscore) || (scan==newsize)) {
s=0;Sf=0;lenf=0; s=0;Sf=0;lenf=0;
for(i=0;(lastscan+i<scan)&&(lastpos+i<oldsize);) { for(i=0;(lastscan+i<scan)&&(lastpos+i<oldsize);) {
if(old[lastpos+i]==new[lastscan+i]) s++; if(old[lastpos+i]==new[lastscan+i]) s++;
i++; 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; lenb=0;
if(scan<newsize) { if(scan<newsize) {
s=0;Sb=0; s=0;Sb=0;
for(i=1;(scan>=lastscan+i)&&(pos>=i);i++) { for(i=1;(scan>=lastscan+i)&&(pos>=i);i++) {
if(old[pos-i]==new[scan-i]) s++; 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) { if(lastscan+lenf>scan-lenb) {
overlap=(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++; old[lastpos+lenf-overlap+i]) s++;
if(new[scan-lenb+i]== if(new[scan-lenb+i]==
old[pos-lenb+i]) s--; old[pos-lenb+i]) s--;
if(s>Ss) { Ss=s; lens=i+1; }; if(s>Ss) { Ss=s; lens=i+1; }
}; }
lenf+=lens-overlap; lenf+=lens-overlap;
lenb-=lens; lenb-=lens;
}; }
for(i=0;i<lenf;i++) for(i=0;i<lenf;i++)
db[dblen+i]=new[lastscan+i]-old[lastpos+i]; db[dblen+i]=new[lastscan+i]-old[lastpos+i];
@ -381,8 +381,8 @@ int main(int argc,char *argv[])
lastscan=scan-lenb; lastscan=scan-lenb;
lastpos=pos-lenb; lastpos=pos-lenb;
lastoffset=pos-scan; lastoffset=pos-scan;
}; }
}; }
BZ2_bzWriteClose(&bz2err, pfbz2, 0, NULL, NULL); BZ2_bzWriteClose(&bz2err, pfbz2, 0, NULL, NULL);
if (bz2err != BZ_OK) if (bz2err != BZ_OK)
errx(1, "BZ2_bzWriteClose, bz2err = %d", bz2err); errx(1, "BZ2_bzWriteClose, bz2err = %d", bz2err);

View File

@ -161,7 +161,7 @@ int main(int argc,char * argv[])
(cbz2err != BZ_STREAM_END))) (cbz2err != BZ_STREAM_END)))
errx(1, "Corrupt patch\n"); errx(1, "Corrupt patch\n");
ctrl[i]=offtin(buf); ctrl[i]=offtin(buf);
}; }
/* Sanity-check */ /* Sanity-check */
if(newpos+ctrl[0]>newsize) if(newpos+ctrl[0]>newsize)
@ -195,7 +195,7 @@ int main(int argc,char * argv[])
/* Adjust pointers */ /* Adjust pointers */
newpos+=ctrl[1]; newpos+=ctrl[1];
oldpos+=ctrl[2]; oldpos+=ctrl[2];
}; }
/* Clean up the bzip2 reads */ /* Clean up the bzip2 reads */
BZ2_bzReadClose(&cbz2err, cpfbz2); BZ2_bzReadClose(&cbz2err, cpfbz2);

View File

@ -381,7 +381,7 @@ walkthrough_dates(struct event **e)
d = m->days; d = m->days;
*e = d->events; *e = d->events;
return (1); return (1);
}; }
if (d->nextday != NULL) { if (d->nextday != NULL) {
d = d->nextday; d = d->nextday;
*e = d->events; *e = d->events;

View File

@ -469,7 +469,7 @@ closecal(FILE *fp)
if (setuid(getuid()) < 0) { if (setuid(getuid()) < 0) {
warnx("setuid failed"); warnx("setuid failed");
_exit(1); _exit(1);
}; }
if (setgid(getegid()) < 0) { if (setgid(getegid()) < 0) {
warnx("setgid failed"); warnx("setgid failed");
_exit(1); _exit(1);

View File

@ -81,7 +81,7 @@ emit(definition *def)
if (strcmp(def->def.ty.old_type, def->def_name) == 0) if (strcmp(def->def.ty.old_type, def->def_name) == 0)
return; return;
}; }
print_header(def); print_header(def);
switch (def->def_kind) { switch (def->def_kind) {
case DEF_UNION: case DEF_UNION:

View File

@ -977,7 +977,7 @@ checkfiles(const char *infile, const char *outfile)
{ {
warn("%s", infile); warn("%s", infile);
crash(); crash();
}; }
if (outfile) { if (outfile) {
if (stat(outfile, &buf) < 0) if (stat(outfile, &buf) < 0)
return; /* file does not exist */ return; /* file does not exist */

View File

@ -329,7 +329,7 @@ def_union(definition *defp)
*tailp = cases; *tailp = cases;
tailp = &cases->next; tailp = &cases->next;
cases = XALLOC(case_list); cases = XALLOC(case_list);
}; }
get_declaration(&dec, DEF_UNION); get_declaration(&dec, DEF_UNION);
cases->case_decl = dec; cases->case_decl = dec;

View File

@ -551,7 +551,7 @@ write_program(definition *def, const char *storage)
(void) sprintf(_errbuf, "unable to free results"); (void) sprintf(_errbuf, "unable to free results");
print_err_message("\t\t"); print_err_message("\t\t");
f_print(fout, "\n"); f_print(fout, "\n");
}; }
print_return("\t"); print_return("\t");
f_print(fout, "}\n"); f_print(fout, "}\n");
} }

View File

@ -454,7 +454,7 @@ add_type(int len, const char *type)
{ {
typ_list_t->next = ptr; typ_list_t->next = ptr;
typ_list_t = ptr; typ_list_t = ptr;
}; }
} }
@ -470,7 +470,7 @@ find_type(const char *type)
return (ptr); return (ptr);
else else
ptr = ptr->next; ptr = ptr->next;
}; }
return (NULL); return (NULL);
} }

View File

@ -194,7 +194,7 @@ main(int argc, char **argv)
default: default:
printf("Hosts on %s:\n", host); printf("Hosts on %s:\n", host);
break; break;
}; }
print_dump(mntdump); print_dump(mntdump);
} }
if (rpcs & DOEXPORTS) { if (rpcs & DOEXPORTS) {
@ -317,7 +317,7 @@ xdr_mntdump(XDR *xdrsp, struct mountlist **mlp)
goto next; goto next;
} }
break; break;
}; }
if (val < 0) { if (val < 0) {
otp = &tp->ml_left; otp = &tp->ml_left;
tp = tp->ml_left; tp = tp->ml_left;
@ -407,7 +407,7 @@ print_dump(struct mountlist *mp)
default: default:
printf("%s\n", mp->ml_host); printf("%s\n", mp->ml_host);
break; break;
}; }
if (mp->ml_right) if (mp->ml_right)
print_dump(mp->ml_right); print_dump(mp->ml_right);
} }

View File

@ -297,7 +297,7 @@ bwscsbdup(const unsigned char *str, size_t len)
/* NOTREACHED */ /* NOTREACHED */
err(2, "mbrtowc error"); err(2, "mbrtowc error");
cptr += charlen; cptr += charlen;
}; }
} }
ret->len = chars; ret->len = chars;

View File

@ -688,7 +688,7 @@ static void setsuffix(wchar_t c, unsigned char *si)
break; break;
default: default:
*si = 0; *si = 0;
}; }
} }
/* /*

View File

@ -1258,7 +1258,7 @@ sort_list_to_file(struct sort_list *list, const char *outfile)
break; break;
default: default:
errx(2, "%s", getstr(10)); errx(2, "%s", getstr(10));
}; }
} }
if (sort_opts_vals.sort_method == SORT_DEFAULT) if (sort_opts_vals.sort_method == SORT_DEFAULT)

View File

@ -1197,7 +1197,7 @@ print_arg(struct syscall_args *sc, unsigned long *args, long *retval,
break; break;
len--; len--;
truncated = 1; truncated = 1;
}; }
fprintf(fp, "\"%s\"%s", tmp3, truncated ? fprintf(fp, "\"%s\"%s", tmp3, truncated ?
"..." : ""); "..." : "");
free(tmp3); free(tmp3);

View File

@ -517,7 +517,7 @@ label(int typ, sym_t *sym, tnode_t *tn)
ci->c_default = 1; ci->c_default = 1;
} }
break; break;
}; }
reached = 1; reached = 1;
} }

View File

@ -139,7 +139,7 @@ main(int argc, char *argv[])
argc--, argv++; argc--, argv++;
else else
readstd = 0; readstd = 0;
}; }
flushsh(); flushsh();
if (cflg == 0) if (cflg == 0)
xsdotc(); xsdotc();

View File

@ -440,7 +440,7 @@ key_net_put_2_svc_prog(uid, arg)
arg->st_netname, (int)sizeof (arg->st_pub_key), arg->st_netname, (int)sizeof (arg->st_pub_key),
arg->st_pub_key, (int)sizeof (arg->st_priv_key), arg->st_pub_key, (int)sizeof (arg->st_priv_key),
arg->st_priv_key); arg->st_priv_key);
}; }
status = pk_netput(uid, arg); status = pk_netput(uid, arg);

View File

@ -1528,7 +1528,7 @@ print_test_pattern(int patt)
case 11: case 11:
printf("framed X^23+X^18+1\n"); printf("framed X^23+X^18+1\n");
break; break;
case 12:; case 12:
printf("framed X^11+X^9+1 w/7ZS\n"); printf("framed X^11+X^9+1 w/7ZS\n");
break; break;
case 13: case 13:

View File

@ -434,7 +434,7 @@ main(int argc, char **argv)
break; break;
default: default:
usage(); usage();
}; }
if (modfind("nfsd") < 0) { if (modfind("nfsd") < 0) {
/* Not present in kernel, try loading it */ /* Not present in kernel, try loading it */
@ -1241,7 +1241,7 @@ xdr_fhs(XDR *xdrsp, caddr_t cp)
return (0); return (0);
return (xdr_long(xdrsp, &auth)); return (xdr_long(xdrsp, &auth));
} }
}; }
return (0); return (0);
} }
@ -2540,7 +2540,7 @@ do_mount(struct exportlist *ep, struct grouplist *grp, int exflags,
*cp = savedc; *cp = savedc;
ret = 1; ret = 1;
goto error_exit; goto error_exit;
}; }
/* /*
* For V4:, use the nfssvc() syscall, instead of mount(). * For V4:, use the nfssvc() syscall, instead of mount().

View File

@ -177,7 +177,7 @@ main(int argc, char *argv[])
default: default:
case '?': case '?':
usage(); usage();
}; }
argv += optind; argv += optind;
argc -= optind; argc -= optind;

View File

@ -214,7 +214,7 @@ main(int argc, char **argv)
default: default:
case '?': case '?':
usage(); usage();
}; }
if (!tcpflag && !udpflag) if (!tcpflag && !udpflag)
udpflag = 1; udpflag = 1;
argv += optind; argv += optind;

View File

@ -2873,7 +2873,7 @@ main(int argc, char **argv)
printf("-A -- Run all canned tests\n"); printf("-A -- Run all canned tests\n");
return(0); return(0);
break; break;
}; }
} }
if ((run_all == 0) && (name == NULL) && (filename == NULL) && if ((run_all == 0) && (name == NULL) && (filename == NULL) &&
(test_mode == 0) && (master_exp == NULL)) { (test_mode == 0) && (master_exp == NULL)) {

View File

@ -598,7 +598,7 @@ main(int argc, char *argv[])
fd = open(fname, O_CREAT | O_TRUNC | O_WRONLY, 0644); fd = open(fname, O_CREAT | O_TRUNC | O_WRONLY, 0644);
if (fd == -1) if (fd == -1)
errx(1, "open(%s)", fname); errx(1, "open(%s)", fname);
}; }
/* Read the message and send data to fd if appropriate */ /* Read the message and send data to fd if appropriate */
if (chunked) { if (chunked) {

View File

@ -1150,7 +1150,7 @@ radius_Account(struct radius *r, struct radacct *ac, struct datalink *dl,
snprintf(ac->multi_session_id, sizeof ac->multi_session_id, "%s", snprintf(ac->multi_session_id, sizeof ac->multi_session_id, "%s",
dl->bundle->ncp.mp.active ? dl->bundle->ncp.mp.active ?
dl->bundle->ncp.mp.server.socket.sun_path : ""); dl->bundle->ncp.mp.server.socket.sun_path : "");
}; }
if (rad_put_string(r->cx.rad, RAD_USER_NAME, ac->user_name) != 0 || 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 || rad_put_int(r->cx.rad, RAD_SERVICE_TYPE, RAD_FRAMED) != 0 ||