Fix some low-hanging lint-fruit: endianness and staticness warnings.

This commit is contained in:
Mark Murray 2002-07-03 16:35:20 +00:00
parent 4d7d5e7c11
commit 7ede89e44b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=99363
2 changed files with 6 additions and 4 deletions

View file

@ -91,8 +91,8 @@ static int Rflag, rflag, vflag;
enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE }; enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE };
int copy(char *[], enum op, int); static int copy(char *[], enum op, int);
int mastercmp(const FTSENT **, const FTSENT **); static int mastercmp(const FTSENT **, const FTSENT **);
int int
main(int argc, char *argv[]) main(int argc, char *argv[])

View file

@ -62,7 +62,9 @@ copy_file(FTSENT *entp, int dne)
{ {
static char buf[MAXBSIZE]; static char buf[MAXBSIZE];
struct stat *fs; struct stat *fs;
int ch, checkch, from_fd, rcount, rval, to_fd, wcount, wresid; int ch, checkch, from_fd, rcount, rval, to_fd;
ssize_t wcount;
size_t wresid;
char *bufp; char *bufp;
#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED #ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
char *p; char *p;
@ -132,7 +134,7 @@ copy_file(FTSENT *entp, int dne)
rval = 1; rval = 1;
} else { } else {
for (bufp = p, wresid = fs->st_size; ; for (bufp = p, wresid = fs->st_size; ;
bufp += wcount, wresid -= wcount) { bufp += wcount, wresid -= (size_t)wcount) {
wcount = write(to_fd, bufp, wresid); wcount = write(to_fd, bufp, wresid);
if (wcount >= wresid || wcount <= 0) if (wcount >= wresid || wcount <= 0)
break; break;