diff options
author | 2009-06-07 08:39:13 +0000 | |
---|---|---|
committer | 2009-06-07 08:39:13 +0000 | |
commit | 57003866bf9d794e291e4f346ca84d4e954c9f0d (patch) | |
tree | 31172ec207533c30e0dfb757d0e9c20d8a1bf39c /usr.bin/diff/diffdir.c | |
parent | Document the gconf2 module. (diff) | |
download | wireguard-openbsd-57003866bf9d794e291e4f346ca84d4e954c9f0d.tar.xz wireguard-openbsd-57003866bf9d794e291e4f346ca84d4e954c9f0d.zip |
More cvs/diff/rcs convergence:
1. Mostly variable/function renaming, SIZE_T_MAX->SIZE_MAX, and
spacing.
2. One strchr -> strncspn.
3. diff had a weird thing where it set file[12] = ofile[12] but
never updated file or ofile, then if file and ofile were different
it freed it. I removed it.
OK millert
Diffstat (limited to 'usr.bin/diff/diffdir.c')
-rw-r--r-- | usr.bin/diff/diffdir.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/diff/diffdir.c b/usr.bin/diff/diffdir.c index 64c187c2a61..83ba4c5b8c1 100644 --- a/usr.bin/diff/diffdir.c +++ b/usr.bin/diff/diffdir.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diffdir.c,v 1.33 2009/06/06 15:37:28 ray Exp $ */ +/* $OpenBSD: diffdir.c,v 1.34 2009/06/07 08:39:13 ray Exp $ */ /* * Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com> @@ -21,7 +21,7 @@ */ #ifndef lint -static const char rcsid[] = "$OpenBSD: diffdir.c,v 1.33 2009/06/06 15:37:28 ray Exp $"; +static const char rcsid[] = "$OpenBSD: diffdir.c,v 1.34 2009/06/07 08:39:13 ray Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -228,7 +228,7 @@ slurpdir(char *path, char **bufp, int enoentok) break; cp += dp->d_reclen; } - dirlist = xmalloc(sizeof(*dirlist) * (entries + 1)); + dirlist = xcalloc(sizeof(*dirlist), entries + 1); for (entries = 0, cp = buf; cp < ebuf; ) { dp = (struct dirent *)cp; if (dp->d_fileno != 0 && !excluded(dp->d_name)) { |