The following commit has been merged in the master branch:
commit 521f32450d91fabaa81725b1ad89f9fafb8c82e3
Author: Guillem Jover <[email protected]>
Date: Sat Oct 16 06:03:12 2010 +0200
libdpkg: Use ohshite in error_context_new instead of ad-hoc code
diff --git a/lib/dpkg/ehandle.c b/lib/dpkg/ehandle.c
index 093e6f6..a5c4349 100644
--- a/lib/dpkg/ehandle.c
+++ b/lib/dpkg/ehandle.c
@@ -114,15 +114,8 @@ error_context_new(void)
struct error_context *necp;
necp = malloc(sizeof(struct error_context));
- if (!necp) {
- int e= errno;
- snprintf(errmsgbuf, sizeof(errmsgbuf), "%s%s",
- _("out of memory pushing error handler: "), strerror(e));
- errmsg= errmsgbuf;
- if (econtext)
- run_error_handler();
- fprintf(stderr, "%s: %s\n", thisname, errmsgbuf); exit(2);
- }
+ if (!necp)
+ ohshite(_("out of memory pushing error handler"));
necp->next= econtext;
necp->cleanups= NULL;
econtext= necp;
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]