From 694bfeb32dc7c5baa40f2e5bac2c5934947af12d Mon Sep 17 00:00:00 2001 From: Xavier Santolaria Date: Tue, 7 Jun 2005 08:19:08 +0000 Subject: cvs_path_cat() already sets errno, no need to duplicate. --- usr.bin/cvs/entries.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'usr.bin/cvs/entries.c') 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 * 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 */ -- cgit v1.2.3