Deleted Added
sdiff udiff text old ( 92555 ) new ( 98937 )
full compact
1/*
2 * Copyright (c) 2000 Markus Friedl. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

147 struct passwd *copy = xmalloc(sizeof(*copy));
148
149 memset(copy, 0, sizeof(*copy));
150 copy->pw_name = xstrdup(pw->pw_name);
151 copy->pw_passwd = xstrdup(pw->pw_passwd);
152 copy->pw_gecos = xstrdup(pw->pw_gecos);
153 copy->pw_uid = pw->pw_uid;
154 copy->pw_gid = pw->pw_gid;
155 copy->pw_expire = pw->pw_expire;
156 copy->pw_change = pw->pw_change;
157 copy->pw_class = xstrdup(pw->pw_class);
158 copy->pw_dir = xstrdup(pw->pw_dir);
159 copy->pw_shell = xstrdup(pw->pw_shell);
160 return copy;
161}
162
163/*
164 * Convert ASCII string to TCP/IP port number.
165 * Port must be >0 and <=65535.

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

312 args->num = 0;
313 } else if (args->num+2 >= args->nalloc)
314 args->nalloc *= 2;
315
316 args->list = xrealloc(args->list, args->nalloc * sizeof(char *));
317 args->list[args->num++] = xstrdup(buf);
318 args->list[args->num] = NULL;
319}