diff options
-rw-r--r-- | bin/ls/print.c | 7 | ||||
-rw-r--r-- | bin/ps/fmt.c | 5 | ||||
-rw-r--r-- | bin/rcp/util.c | 7 |
3 files changed, 8 insertions, 11 deletions
diff --git a/bin/ls/print.c b/bin/ls/print.c index 380668e6961..4f548df3acf 100644 --- a/bin/ls/print.c +++ b/bin/ls/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.21 2003/09/24 20:36:36 deraadt Exp $ */ +/* $OpenBSD: print.c,v 1.22 2003/09/26 00:48:44 deraadt Exp $ */ /* $NetBSD: print.c,v 1.15 1996/12/11 03:25:39 thorpej Exp $ */ /* @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.5 (Berkeley) 7/28/94"; #else -static char rcsid[] = "$OpenBSD: print.c,v 1.21 2003/09/24 20:36:36 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: print.c,v 1.22 2003/09/26 00:48:44 deraadt Exp $"; #endif #endif /* not lint */ @@ -179,8 +179,7 @@ printcol(DISPLAY *dp) if ((a = realloc(array, dp->entries * sizeof(FTSENT *))) == NULL) { - if (array) - free(array); + free(array); array = NULL; dp->entries = 0; lastentries = -1; diff --git a/bin/ps/fmt.c b/bin/ps/fmt.c index 8de727a22eb..f49f3be1bc0 100644 --- a/bin/ps/fmt.c +++ b/bin/ps/fmt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fmt.c,v 1.5 2003/09/24 20:39:18 deraadt Exp $ */ +/* $OpenBSD: fmt.c,v 1.6 2003/09/26 00:48:44 deraadt Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -65,8 +65,7 @@ fmt_puts(char *s, int *leftp) newmaxlen *= 2; nv = realloc(v, newmaxlen); if (nv == 0) { - if (v) - free(v); + free(v); v = NULL; maxlen = 0; return; diff --git a/bin/rcp/util.c b/bin/rcp/util.c index 9daa3948eb6..48042248a66 100644 --- a/bin/rcp/util.c +++ b/bin/rcp/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.13 2003/07/28 06:05:35 tedu Exp $ */ +/* $OpenBSD: util.c,v 1.14 2003/09/26 00:48:44 deraadt Exp $ */ /* $NetBSD: util.c,v 1.2 1995/03/21 08:19:08 cgd Exp $ */ /*- @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)util.c 8.2 (Berkeley) 4/2/94"; #else -static const char rcsid[] = "$OpenBSD: util.c,v 1.13 2003/07/28 06:05:35 tedu Exp $"; +static const char rcsid[] = "$OpenBSD: util.c,v 1.14 2003/09/26 00:48:44 deraadt Exp $"; #endif #endif /* not lint */ @@ -144,8 +144,7 @@ allocbuf(BUF *bp, int fd, int blksize) if (bp->cnt >= size) return (bp); if ((p = realloc(bp->buf, size)) == NULL) { - if (bp->buf) - free(bp->buf); + free(bp->buf); bp->buf = NULL; bp->cnt = 0; run_err("%s", strerror(errno)); |