indent: avoid calling write(2) with a negative second parameter.
negative_returns: n is passed to a parameter that cannot be negative. Fix a style issue while here. CID: 1008107
This commit is contained in:
parent
938809f941
commit
0504bd6580
@ -1213,7 +1213,7 @@ bakcopy(void)
|
||||
bakchn = creat(bakfile, 0600);
|
||||
if (bakchn < 0)
|
||||
err(1, "%s", bakfile);
|
||||
while ((n = read(fileno(input), buff, sizeof buff)) != 0)
|
||||
while ((n = read(fileno(input), buff, sizeof(buff))) > 0)
|
||||
if (write(bakchn, buff, n) != n)
|
||||
err(1, "%s", bakfile);
|
||||
if (n < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user