use errx, errno might not be set, improve error message
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10061 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999 Kungliga Tekniska H<>gskolan
|
||||
* Copyright (c) 1999 - 2001 Kungliga Tekniska H<>gskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -51,6 +51,6 @@ emalloc (size_t sz)
|
||||
void *tmp = malloc (sz);
|
||||
|
||||
if (tmp == NULL && sz != 0)
|
||||
err (1, "malloc %lu", (unsigned long)sz);
|
||||
errx (1, "malloc %lu failed", (unsigned long)sz);
|
||||
return tmp;
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999 Kungliga Tekniska H<>gskolan
|
||||
* Copyright (c) 1999 - 2001 Kungliga Tekniska H<>gskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -51,6 +51,6 @@ erealloc (void *ptr, size_t sz)
|
||||
void *tmp = realloc (ptr, sz);
|
||||
|
||||
if (tmp == NULL && sz != 0)
|
||||
err (1, "realloc %lu", (unsigned long)sz);
|
||||
errx (1, "realloc %lu failed", (unsigned long)sz);
|
||||
return tmp;
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999 Kungliga Tekniska H<>gskolan
|
||||
* Copyright (c) 1999 - 2001 Kungliga Tekniska H<>gskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -51,6 +51,6 @@ estrdup (const char *str)
|
||||
char *tmp = strdup (str);
|
||||
|
||||
if (tmp == NULL)
|
||||
err (1, "strdup");
|
||||
errx (1, "strdup failed");
|
||||
return tmp;
|
||||
}
|
||||
|
Reference in New Issue
Block a user