[svn-upgrade] Integrating new upstream version, shadow (4.0.4)

This commit is contained in:
nekral-guest
2007-10-07 11:45:23 +00:00
parent 4903ce068e
commit effd479bff
431 changed files with 56747 additions and 47326 deletions

View File

@ -10,29 +10,24 @@
#include <config.h>
#include "rcsid.h"
RCSID("$Id: xmalloc.c,v 1.3 1998/12/28 20:34:56 marekm Exp $")
RCSID ("$Id: xmalloc.c,v 1.4 2003/04/22 10:59:22 kloczek Exp $")
#include <stdio.h>
#include "defines.h"
extern char *malloc ();
extern char *malloc();
char *
xmalloc(size_t size)
char *xmalloc (size_t size)
{
char *ptr;
ptr = malloc(size);
ptr = malloc (size);
if (!ptr && size) {
fprintf(stderr, _("malloc(%d) failed\n"), (int) size);
exit(13);
fprintf (stderr, _("malloc(%d) failed\n"), (int) size);
exit (13);
}
return ptr;
}
char *
xstrdup(const char *str)
char *xstrdup (const char *str)
{
return strcpy(xmalloc(strlen(str) + 1), str);
return strcpy (xmalloc (strlen (str) + 1), str);
}