diff options
author | dduvall <none@none> | 2006-12-13 22:37:35 -0800 |
---|---|---|
committer | dduvall <none@none> | 2006-12-13 22:37:35 -0800 |
commit | 7d0d5588e73fc4ac036733d158e41d506289722a (patch) | |
tree | 20c198c3f4d5706c5adecada67f0f0cf99ae112e /usr/src/lib/libc | |
parent | 9ba7e32f37631a29f011e29a926eab05899802ca (diff) | |
download | illumos-joyent-7d0d5588e73fc4ac036733d158e41d506289722a.tar.gz |
backout 6472892: insufficient force and/or distance
Diffstat (limited to 'usr/src/lib/libc')
-rw-r--r-- | usr/src/lib/libc/port/gen/closedir.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/usr/src/lib/libc/port/gen/closedir.c b/usr/src/lib/libc/port/gen/closedir.c index a984bc0b06..94212c7825 100644 --- a/usr/src/lib/libc/port/gen/closedir.c +++ b/usr/src/lib/libc/port/gen/closedir.c @@ -2,8 +2,9 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -49,12 +50,9 @@ int closedir(DIR *dirp) { - int fd = -1; + int fd = dirp->dd_fd; - if (dirp != NULL && dirp->dd_buf != NULL) { - fd = dirp->dd_fd; - lfree(dirp->dd_buf, DIRBUF); - lfree(dirp, sizeof (DIR)); - } + lfree(dirp->dd_buf, DIRBUF); + lfree(dirp, sizeof (DIR)); return (close(fd)); } |