getpwent.c (b5acd0014ee3e0962ded83e7869d1ca0f1275612) | getpwent.c (e8420087b0ae4a2d0611cd2f6413d150cfc83554) |
---|---|
1/* 2 * Copyright (c) 1988, 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 --- 273 unchanged lines hidden (view full) --- 282 283 if ((_pw_db->get)(_pw_db, key, &data, 0)) 284 return(0); 285 p = (char *)data.data; 286 287 /* Increase buffer size for long lines if necessary. */ 288 if (data.size > max) { 289 max = data.size + 1024; | 1/* 2 * Copyright (c) 1988, 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 --- 273 unchanged lines hidden (view full) --- 282 283 if ((_pw_db->get)(_pw_db, key, &data, 0)) 284 return(0); 285 p = (char *)data.data; 286 287 /* Increase buffer size for long lines if necessary. */ 288 if (data.size > max) { 289 max = data.size + 1024; |
290 if (!(line = realloc(line, max))) | 290 if (!(line = reallocf(line, max))) |
291 return(0); 292 } 293 294 /* THIS CODE MUST MATCH THAT IN pwd_mkdb. */ 295 t = line; 296#define EXPAND(e) e = t; while ( (*t++ = *p++) ); 297#define SCALAR(v) memmove(&(v), p, sizeof v); p += sizeof v 298 EXPAND(_pw_passwd.pw_name); --- 548 unchanged lines hidden --- | 291 return(0); 292 } 293 294 /* THIS CODE MUST MATCH THAT IN pwd_mkdb. */ 295 t = line; 296#define EXPAND(e) e = t; while ( (*t++ = *p++) ); 297#define SCALAR(v) memmove(&(v), p, sizeof v); p += sizeof v 298 EXPAND(_pw_passwd.pw_name); --- 548 unchanged lines hidden --- |