Deleted Added
full compact
opendir.c (23768) opendir.c (34357)
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

--- 177 unchanged lines hidden (view full) ---

186 */
187 for (dpv = 0;;) {
188 n = 0;
189 ddptr = buf;
190 while (ddptr < ddeptr) {
191 struct dirent *dp;
192
193 dp = (struct dirent *) ddptr;
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

--- 177 unchanged lines hidden (view full) ---

186 */
187 for (dpv = 0;;) {
188 n = 0;
189 ddptr = buf;
190 while (ddptr < ddeptr) {
191 struct dirent *dp;
192
193 dp = (struct dirent *) ddptr;
194 if ((int)dp & 03)
194 if ((long)dp & 03L)
195 break;
196 if ((dp->d_reclen <= 0) ||
197 (dp->d_reclen > (ddeptr + 1 - ddptr)))
198 break;
199 ddptr += dp->d_reclen;
200 if (dp->d_fileno) {
201 if (dpv)
202 dpv[n] = dp;

--- 72 unchanged lines hidden ---
195 break;
196 if ((dp->d_reclen <= 0) ||
197 (dp->d_reclen > (ddeptr + 1 - ddptr)))
198 break;
199 ddptr += dp->d_reclen;
200 if (dp->d_fileno) {
201 if (dpv)
202 dpv[n] = dp;

--- 72 unchanged lines hidden ---