opendir.c (115047) | opendir.c (123861) |
---|---|
1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 21 unchanged lines hidden (view full) --- 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#if defined(LIBC_SCCS) && !defined(lint) 35static char sccsid[] = "@(#)opendir.c 8.8 (Berkeley) 5/1/95"; 36#endif /* LIBC_SCCS and not lint */ 37#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1983, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 21 unchanged lines hidden (view full) --- 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 */ 33 34#if defined(LIBC_SCCS) && !defined(lint) 35static char sccsid[] = "@(#)opendir.c 8.8 (Berkeley) 5/1/95"; 36#endif /* LIBC_SCCS and not lint */ 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/lib/libc/gen/opendir.c 115047 2003-05-16 02:15:07Z tjr $"); | 38__FBSDID("$FreeBSD: head/lib/libc/gen/opendir.c 123861 2003-12-26 12:00:46Z dfr $"); |
39 40#include "namespace.h" 41#include <sys/param.h> 42#include <sys/mount.h> 43#include <sys/stat.h> 44 45#include <dirent.h> 46#include <errno.h> --- 206 unchanged lines hidden (view full) --- 253 break; 254 } 255 } 256 257 dirp->dd_len = len; 258 dirp->dd_size = ddptr - dirp->dd_buf; 259 } else { 260 dirp->dd_len = incr; | 39 40#include "namespace.h" 41#include <sys/param.h> 42#include <sys/mount.h> 43#include <sys/stat.h> 44 45#include <dirent.h> 46#include <errno.h> --- 206 unchanged lines hidden (view full) --- 253 break; 254 } 255 } 256 257 dirp->dd_len = len; 258 dirp->dd_size = ddptr - dirp->dd_buf; 259 } else { 260 dirp->dd_len = incr; |
261 dirp->dd_size = 0; |
|
261 dirp->dd_buf = malloc(dirp->dd_len); 262 if (dirp->dd_buf == NULL) 263 goto fail; 264 dirp->dd_seek = 0; 265 flags &= ~DTF_REWIND; 266 } 267 268 dirp->dd_loc = 0; --- 18 unchanged lines hidden --- | 262 dirp->dd_buf = malloc(dirp->dd_len); 263 if (dirp->dd_buf == NULL) 264 goto fail; 265 dirp->dd_seek = 0; 266 flags &= ~DTF_REWIND; 267 } 268 269 dirp->dd_loc = 0; --- 18 unchanged lines hidden --- |