summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
133ce0b)
SCCS-vsn: bin/rcp/rcp.c 5.11
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)rcp.c 5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)rcp.c 5.11 (Berkeley) %G%";
(void) close(f);
continue;
}
(void) close(f);
continue;
}
- if ((bp = allocbuf(&buffer, f, BUFSIZ)) < 0) {
+ if ((bp = allocbuf(&buffer, f, BUFSIZ)) == 0) {
(void) close(f);
continue;
}
(void) close(f);
continue;
}
if (exists && pflag)
(void) fchmod(of, mode);
ga();
if (exists && pflag)
(void) fchmod(of, mode);
ga();
- if ((bp = allocbuf(&buffer, of, BUFSIZ)) < 0) {
+ if ((bp = allocbuf(&buffer, of, BUFSIZ)) == 0) {
(void) close(of);
continue;
}
(void) close(of);
continue;
}
if (fstat(fd, &stb) < 0) {
error("rcp: fstat: %s\n", sys_errlist[errno]);
if (fstat(fd, &stb) < 0) {
error("rcp: fstat: %s\n", sys_errlist[errno]);
- return ((struct buffer *)-1);
+ return ((struct buffer *)0);
}
size = roundup(stb.st_blksize, blksize);
if (size == 0)
}
size = roundup(stb.st_blksize, blksize);
if (size == 0)
bp->buf = (char *)malloc((unsigned) size);
if (bp->buf == 0) {
error("rcp: malloc: out of memory\n");
bp->buf = (char *)malloc((unsigned) size);
if (bp->buf == 0) {
error("rcp: malloc: out of memory\n");
- return ((struct buffer *)-1);
+ return ((struct buffer *)0);