diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-01-25 18:56:34 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-01-25 18:56:34 +0000 |
commit | aabe59db15cb39a42f27d1427d74f2d201c72303 (patch) | |
tree | affbf2262bfb8b8bd0de9149dc39fcaea2339163 /usr.bin/cvs/repository.c | |
parent | 3fae22de6760a857ade5af2f402f0a53e5575715 (diff) |
use more stack allocations for fixed size buffers. ok xsa@ joris@
Diffstat (limited to 'usr.bin/cvs/repository.c')
-rw-r--r-- | usr.bin/cvs/repository.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/usr.bin/cvs/repository.c b/usr.bin/cvs/repository.c index 2ff62dc3434..5f92673c806 100644 --- a/usr.bin/cvs/repository.c +++ b/usr.bin/cvs/repository.c @@ -1,4 +1,4 @@ -/* $OpenBSD: repository.c,v 1.8 2007/01/19 23:23:21 joris Exp $ */ +/* $OpenBSD: repository.c,v 1.9 2007/01/25 18:56:33 otto Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -93,10 +93,7 @@ cvs_repository_getdir(const char *dir, const char *wdir, DIR *dirp; struct stat st; struct dirent *dp; - char *s, *fpath, *rpath; - - rpath = xmalloc(MAXPATHLEN); - fpath = xmalloc(MAXPATHLEN); + char *s, fpath[MAXPATHLEN], rpath[MAXPATHLEN]; if ((dirp = opendir(dir)) == NULL) fatal("cvs_repository_getdir: failed to open '%s'", dir); @@ -168,8 +165,5 @@ cvs_repository_getdir(const char *dir, const char *wdir, } } - xfree(rpath); - xfree(fpath); - (void)closedir(dirp); } |