diff options
author | 2005-06-07 08:19:07 +0000 | |
---|---|---|
committer | 2005-06-07 08:19:07 +0000 | |
commit | 5885ecaee92957268f20dfba5a5a6582929a5f11 (patch) | |
tree | f2c0e257198d654a1aee6c5e85a1418cc55bef0c /usr.bin/cvs/entries.c | |
parent | only display the ``cannot open ./CVS/Entries'' error message when (diff) | |
download | wireguard-openbsd-5885ecaee92957268f20dfba5a5a6582929a5f11.tar.xz wireguard-openbsd-5885ecaee92957268f20dfba5a5a6582929a5f11.zip |
cvs_path_cat() already sets errno, no need to duplicate.
Diffstat (limited to 'usr.bin/cvs/entries.c')
-rw-r--r-- | usr.bin/cvs/entries.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/cvs/entries.c b/usr.bin/cvs/entries.c index 2c93ffa7490..b1f7f5902cf 100644 --- a/usr.bin/cvs/entries.c +++ b/usr.bin/cvs/entries.c @@ -1,4 +1,4 @@ -/* $OpenBSD: entries.c,v 1.36 2005/06/07 07:23:41 xsa Exp $ */ +/* $OpenBSD: entries.c,v 1.37 2005/06/07 08:19:07 xsa Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -71,11 +71,9 @@ cvs_ent_open(const char *dir, int flags) * update or checkout of a module. */ len = cvs_path_cat(dir, CVS_PATH_CVSDIR, cdpath, sizeof(cdpath)); - if (len >= sizeof(cdpath)) { - errno = ENAMETOOLONG; - cvs_log(LP_ERRNO, "%s", cdpath); + if (len >= sizeof(cdpath)) return (NULL); - } + if ((stat(cdpath, &st) == 0) && S_ISDIR(st.st_mode)) nodir = 0; /* the CVS/ directory does exist */ |