NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/45659: Rename lable in opendir.c.
>Number: 45659
>Category: lib
>Synopsis: Rename lable in opendir.c.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Nov 27 08:20:00 +0000 2011
>Originator: Henning Petersen
>Release: NetBSD-current
>Organization:
>Environment:
>Description:
Label and variable with same name "error" in opendir.c.
>How-To-Repeat:
>Fix:
Rename label error to fail.
diff -u -p -r1.38 opendir.c
--- lib/libc/gen/opendir.c 15 Oct 2011 23:00:01 -0000 1.38
+++ lib/libc/gen/opendir.c 23 Nov 2011 09:07:07 -0000
@@ -104,16 +104,16 @@ __opendir_common(int fd, const char *nam
if (fstat(fd, &sb) || !S_ISDIR(sb.st_mode)) {
errno = ENOTDIR;
- goto error;
+ goto fail;
}
if ((dirp = malloc(sizeof(*dirp))) == NULL)
- goto error;
+ goto fail;
dirp->dd_buf = NULL;
dirp->dd_internal = NULL;
#ifdef _REENTRANT
if (__isthreaded) {
if ((dirp->dd_lock = malloc(sizeof(mutex_t))) == NULL)
- goto error;
+ goto fail;
mutex_init((mutex_t *)dirp->dd_lock, NULL);
}
#endif
@@ -123,7 +123,7 @@ __opendir_common(int fd, const char *nam
*/
if (fstatvfs1(fd, &sfb, ST_NOWAIT) < 0)
- goto error;
+ goto fail;
if ((flags & DTF_NODUP) != 0) {
if (!strncmp(sfb.f_fstypename, MOUNT_UNION,
sizeof(sfb.f_fstypename)) ||
@@ -141,11 +141,11 @@ __opendir_common(int fd, const char *nam
error = _initdir(dirp, fd, name);
if (error) {
errno = error;
- goto error;
+ goto fail;
return (dirp);
-error:
+fail:
serrno = errno;
if (dirp != NULL) {
#ifdef _REENTRANT
Home |
Main Index |
Thread Index |
Old Index