summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rmt/rmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/rmt/rmt.c')
-rw-r--r--usr.sbin/rmt/rmt.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/rmt/rmt.c b/usr.sbin/rmt/rmt.c
index a5c048f..57c8439 100644
--- a/usr.sbin/rmt/rmt.c
+++ b/usr.sbin/rmt/rmt.c
@@ -84,8 +84,10 @@ main(int argc, char **argv)
argc--, argv++;
if (argc > 0) {
debug = fopen(*argv, "w");
- if (debug == 0)
+ if (debug == NULL) {
+ DEBUG1("rmtd: error to open %s\n", *argv);
exit(1);
+ }
(void)setbuf(debug, (char *)0);
}
top:
@@ -226,10 +228,10 @@ checkbuf(char *rec, int size)
if (size <= maxrecsize)
return (rec);
- if (rec != 0)
+ if (rec != NULL)
free(rec);
rec = malloc(size);
- if (rec == 0) {
+ if (rec == NULL) {
DEBUG("rmtd: cannot allocate buffer space\n");
exit(4);
}
OpenPOWER on IntegriCloud