From 3a0f4baf2fda25aafdd43589265980c5dbb19fc1 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Tue, 22 Aug 2000 15:47:57 +0000 Subject: Fixed a warning about a label not being used --- coreutils/ls.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'coreutils') diff --git a/coreutils/ls.c b/coreutils/ls.c index 20373eaaa..207c61763 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c @@ -483,8 +483,10 @@ static int list_item(const char *name) lstat(fullname, &cur->dstat); /* get file stat info into node */ dnp[ni++]= cur; /* save pointer to node in array */ #else - if (lstat(fullname, &info)) - goto direrr; /* (shouldn't fail) */ + if (lstat(fullname, &info)) { + closedir(dir); + goto listerr; /* (shouldn't fail) */ + } list_single(entry->d_name, &info, fullname); #endif } @@ -504,8 +506,6 @@ static int list_item(const char *name) return 0; - direrr: - closedir(dir); listerr: newline(); perror(name); -- cgit v1.2.3