diff options
| author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-15 22:31:22 +0000 |
|---|---|---|
| committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-04-15 22:31:22 +0000 |
| commit | 80c7cc1c8f027fcf5d5f0a2df4b9aef6904ed079 (patch) | |
| tree | f34884b5132e36e8b0946f07dc1cf090047af8fb /usr.bin | |
| parent | 14a0ca29fe703fdb1903fd229ad762a1192690c7 (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/bsdiff/bsdiff/bsdiff.c | 50 | ||||
| -rw-r--r-- | usr.bin/bsdiff/bspatch/bspatch.c | 4 | ||||
| -rw-r--r-- | usr.bin/calendar/dates.c | 2 | ||||
| -rw-r--r-- | usr.bin/calendar/io.c | 2 | ||||
| -rw-r--r-- | usr.bin/rpcgen/rpc_cout.c | 2 | ||||
| -rw-r--r-- | usr.bin/rpcgen/rpc_main.c | 2 | ||||
| -rw-r--r-- | usr.bin/rpcgen/rpc_parse.c | 2 | ||||
| -rw-r--r-- | usr.bin/rpcgen/rpc_svcout.c | 2 | ||||
| -rw-r--r-- | usr.bin/rpcgen/rpc_util.c | 4 | ||||
| -rw-r--r-- | usr.bin/showmount/showmount.c | 6 | ||||
| -rw-r--r-- | usr.bin/sort/bwstring.c | 2 | ||||
| -rw-r--r-- | usr.bin/sort/coll.c | 2 | ||||
| -rw-r--r-- | usr.bin/sort/file.c | 2 | ||||
| -rw-r--r-- | usr.bin/truss/syscalls.c | 2 | ||||
| -rw-r--r-- | usr.bin/xlint/lint1/func.c | 2 | ||||
| -rw-r--r-- | usr.bin/xstr/xstr.c | 2 |
16 files changed, 44 insertions, 44 deletions
diff --git a/usr.bin/bsdiff/bsdiff/bsdiff.c b/usr.bin/bsdiff/bsdiff/bsdiff.c index 7e39275a0a460..e0b3ee7d25534 100644 --- a/usr.bin/bsdiff/bsdiff/bsdiff.c +++ b/usr.bin/bsdiff/bsdiff/bsdiff.c @@ -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) { 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_t start,off_t len,off_t h) } 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_t start,off_t len,off_t h) } 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_char *old,off_t oldsize) 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,off_t oldsize, *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); diff --git a/usr.bin/bsdiff/bspatch/bspatch.c b/usr.bin/bsdiff/bspatch/bspatch.c index db72e5c702365..eb99e5ba16a06 100644 --- a/usr.bin/bsdiff/bspatch/bspatch.c +++ b/usr.bin/bsdiff/bspatch/bspatch.c @@ -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); diff --git a/usr.bin/calendar/dates.c b/usr.bin/calendar/dates.c index a5f5e9fa02867..86d8a1fee9ff2 100644 --- a/usr.bin/calendar/dates.c +++ b/usr.bin/calendar/dates.c @@ -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; diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c index 89863f45d7f0b..0a5dd854546f9 100644 --- a/usr.bin/calendar/io.c +++ b/usr.bin/calendar/io.c @@ -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); diff --git a/usr.bin/rpcgen/rpc_cout.c b/usr.bin/rpcgen/rpc_cout.c index 4c36ce6c583db..0c2ce2098b36a 100644 --- a/usr.bin/rpcgen/rpc_cout.c +++ b/usr.bin/rpcgen/rpc_cout.c @@ -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: diff --git a/usr.bin/rpcgen/rpc_main.c b/usr.bin/rpcgen/rpc_main.c index b7b255afa5861..64a29adc94f2c 100644 --- a/usr.bin/rpcgen/rpc_main.c +++ b/usr.bin/rpcgen/rpc_main.c @@ -977,7 +977,7 @@ checkfiles(const char *infile, const char *outfile) { warn("%s", infile); crash(); - }; + } if (outfile) { if (stat(outfile, &buf) < 0) return; /* file does not exist */ diff --git a/usr.bin/rpcgen/rpc_parse.c b/usr.bin/rpcgen/rpc_parse.c index f7f857a0c9a5e..69392b702a35d 100644 --- a/usr.bin/rpcgen/rpc_parse.c +++ b/usr.bin/rpcgen/rpc_parse.c @@ -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; diff --git a/usr.bin/rpcgen/rpc_svcout.c b/usr.bin/rpcgen/rpc_svcout.c index 4b951a337df41..aa5a86ad2ba92 100644 --- a/usr.bin/rpcgen/rpc_svcout.c +++ b/usr.bin/rpcgen/rpc_svcout.c @@ -551,7 +551,7 @@ write_program(definition *def, const char *storage) (void) sprintf(_errbuf, "unable to free results"); print_err_message("\t\t"); f_print(fout, "\n"); - }; + } print_return("\t"); f_print(fout, "}\n"); } diff --git a/usr.bin/rpcgen/rpc_util.c b/usr.bin/rpcgen/rpc_util.c index bf0ca5dee91f7..14741186d5d71 100644 --- a/usr.bin/rpcgen/rpc_util.c +++ b/usr.bin/rpcgen/rpc_util.c @@ -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); } diff --git a/usr.bin/showmount/showmount.c b/usr.bin/showmount/showmount.c index 46e58e4ba74ae..01c9e261c753e 100644 --- a/usr.bin/showmount/showmount.c +++ b/usr.bin/showmount/showmount.c @@ -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 **mlp) 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); } diff --git a/usr.bin/sort/bwstring.c b/usr.bin/sort/bwstring.c index fc30b56ae8851..3965eaed1c98b 100644 --- a/usr.bin/sort/bwstring.c +++ b/usr.bin/sort/bwstring.c @@ -297,7 +297,7 @@ bwscsbdup(const unsigned char *str, size_t len) /* NOTREACHED */ err(2, "mbrtowc error"); cptr += charlen; - }; + } } ret->len = chars; diff --git a/usr.bin/sort/coll.c b/usr.bin/sort/coll.c index 0b7eb571b8f5f..7b4ad1067810d 100644 --- a/usr.bin/sort/coll.c +++ b/usr.bin/sort/coll.c @@ -688,7 +688,7 @@ static void setsuffix(wchar_t c, unsigned char *si) break; default: *si = 0; - }; + } } /* diff --git a/usr.bin/sort/file.c b/usr.bin/sort/file.c index 0a0088947deef..47d59af5b1dd2 100644 --- a/usr.bin/sort/file.c +++ b/usr.bin/sort/file.c @@ -1258,7 +1258,7 @@ sort_list_to_file(struct sort_list *list, const char *outfile) break; default: errx(2, "%s", getstr(10)); - }; + } } if (sort_opts_vals.sort_method == SORT_DEFAULT) diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index 9f291f0519274..3bf7b9d69ede7 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -1197,7 +1197,7 @@ print_arg(struct syscall_args *sc, unsigned long *args, long *retval, break; len--; truncated = 1; - }; + } fprintf(fp, "\"%s\"%s", tmp3, truncated ? "..." : ""); free(tmp3); diff --git a/usr.bin/xlint/lint1/func.c b/usr.bin/xlint/lint1/func.c index 893121e56d8d1..e5a0490c5a3ad 100644 --- a/usr.bin/xlint/lint1/func.c +++ b/usr.bin/xlint/lint1/func.c @@ -517,7 +517,7 @@ label(int typ, sym_t *sym, tnode_t *tn) ci->c_default = 1; } break; - }; + } reached = 1; } diff --git a/usr.bin/xstr/xstr.c b/usr.bin/xstr/xstr.c index 670e09ebafc70..4aad8e66e74a4 100644 --- a/usr.bin/xstr/xstr.c +++ b/usr.bin/xstr/xstr.c @@ -139,7 +139,7 @@ main(int argc, char *argv[]) argc--, argv++; else readstd = 0; - }; + } flushsh(); if (cflg == 0) xsdotc(); |
