diff options
author | 2007-06-09 05:16:21 +0000 | |
---|---|---|
committer | 2007-06-09 05:16:21 +0000 | |
commit | aa215433f75a08be5b26380d5ae69bb662cf630a (patch) | |
tree | a405bd42081c3e31c310041cb904ec65840c09ef /usr.bin/diff/diffdir.c | |
parent | various simple typo cleanups, basically making this look a lot more like (diff) | |
download | wireguard-openbsd-aa215433f75a08be5b26380d5ae69bb662cf630a.tar.xz wireguard-openbsd-aa215433f75a08be5b26380d5ae69bb662cf630a.zip |
- Change sizeof(type) to sizeof(*ptr).
- Move function prototypes before variables.
No binary change.
OK otto and 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 bd5a7fcca08..2bf2130ab6c 100644 --- a/usr.bin/diff/diffdir.c +++ b/usr.bin/diff/diffdir.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diffdir.c,v 1.31 2007/05/29 18:24:56 ray Exp $ */ +/* $OpenBSD: diffdir.c,v 1.32 2007/06/09 05:16:21 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.31 2007/05/29 18:24:56 ray Exp $"; +static const char rcsid[] = "$OpenBSD: diffdir.c,v 1.32 2007/06/09 05:16:21 ray Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -226,7 +226,7 @@ slurpdir(char *path, char **bufp, int enoentok) break; cp += dp->d_reclen; } - dirlist = xmalloc(sizeof(struct dirent *) * (entries + 1)); + dirlist = xmalloc(sizeof(*dirlist) * (entries + 1)); for (entries = 0, cp = buf; cp < ebuf; ) { dp = (struct dirent *)cp; if (dp->d_fileno != 0 && !excluded(dp->d_name)) { |