2 * Copyright (C) 1995-1999 Jeffrey A. Uphoff
3 * Modified by Olaf Kirch, 1996.
4 * Modified by H.J. Lu, 1998.
21 * Error-checking malloc() wrapper.
29 return ((void *)NULL);
31 if (!(ptr = malloc (size)))
32 xlog_err ("malloc failed");
39 * Error-checking strdup() wrapper.
42 xstrdup (const char *string)
46 /* Will only fail if underlying malloc() fails (ENOMEM). */
47 if (!(result = strdup (string)))
48 xlog_err ("strdup failed");