Deleted Added
full compact
getcwd.c (36060) getcwd.c (39327)
1/*
2 * Copyright (c) 1989, 1991, 1993, 1995
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

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

177 }
178
179 /*
180 * Build pointer to the parent directory, allocating memory
181 * as necessary. Max length is 3 for "../", the largest
182 * possible component name, plus a trailing NULL.
183 */
184 if (bup + 3 + MAXNAMLEN + 1 >= eup) {
1/*
2 * Copyright (c) 1989, 1991, 1993, 1995
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

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

177 }
178
179 /*
180 * Build pointer to the parent directory, allocating memory
181 * as necessary. Max length is 3 for "../", the largest
182 * possible component name, plus a trailing NULL.
183 */
184 if (bup + 3 + MAXNAMLEN + 1 >= eup) {
185 if ((up = realloc(up, upsize *= 2)) == NULL)
185 if ((up = reallocf(up, upsize *= 2)) == NULL)
186 goto err;
187 bup = up;
188 eup = up + upsize;
189 }
190 *bup++ = '.';
191 *bup++ = '.';
192 *bup = '\0';
193

--- 92 unchanged lines hidden ---
186 goto err;
187 bup = up;
188 eup = up + upsize;
189 }
190 *bup++ = '.';
191 *bup++ = '.';
192 *bup = '\0';
193

--- 92 unchanged lines hidden ---