diff options
| author | dholland <dholland@NetBSD.org> | 2010-12-25 20:35:25 +0000 |
|---|---|---|
| committer | dholland <dholland@NetBSD.org> | 2010-12-25 20:35:25 +0000 |
| commit | 8a73f454155f12e68a068af184fe6eef47f617ae (patch) | |
| tree | e58f478a5ac9e3d3c38d9bd53176d9c98bc6ac5a /usr.bin/make/make_malloc.c | |
| parent | 9bf4b57be29cbecf218070e07d0c636e7c224ba9 (diff) | |
Many C libraries don't set errno when malloc fails, so always use
strerror(ENOMEM).
Diffstat (limited to 'usr.bin/make/make_malloc.c')
| -rw-r--r-- | usr.bin/make/make_malloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/make/make_malloc.c b/usr.bin/make/make_malloc.c index ac90d265fa6..f0ccbc44bda 100644 --- a/usr.bin/make/make_malloc.c +++ b/usr.bin/make/make_malloc.c @@ -1,4 +1,4 @@ -/* $NetBSD: make_malloc.c,v 1.5 2009/01/24 23:19:50 dsl Exp $ */ +/* $NetBSD: make_malloc.c,v 1.6 2010/12/25 20:35:25 dholland Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ #ifdef MAKE_NATIVE #include <sys/cdefs.h> -__RCSID("$NetBSD: make_malloc.c,v 1.5 2009/01/24 23:19:50 dsl Exp $"); +__RCSID("$NetBSD: make_malloc.c,v 1.6 2010/12/25 20:35:25 dholland Exp $"); #endif #include <stdio.h> @@ -48,7 +48,7 @@ enomem(void) { extern char *progname; - (void)fprintf(stderr, "%s: %s.\n", progname, strerror(errno)); + (void)fprintf(stderr, "%s: %s.\n", progname, strerror(ENOMEM)); exit(2); } |
