public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-projects commit in pax-utils: paxinc.c paxmacho.c
@ 2008-12-30 12:15 Mike Frysinger (vapier)
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger (vapier) @ 2008-12-30 12:15 UTC (permalink / raw
  To: gentoo-commits

vapier      08/12/30 12:15:32

  Modified:             paxinc.c paxmacho.c
  Log:
  use xmalloc() rather than malloc()

Revision  Changes    Path
1.11                 pax-utils/paxinc.c

file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/paxinc.c?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/paxinc.c?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/paxinc.c?r1=1.10&r2=1.11

Index: paxinc.c
===================================================================
RCS file: /var/cvsroot/gentoo-projects/pax-utils/paxinc.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- paxinc.c	19 Oct 2008 18:55:33 -0000	1.10
+++ paxinc.c	30 Dec 2008 12:15:32 -0000	1.11
@@ -1,7 +1,7 @@
 /*
  * Copyright 2003-2007 Gentoo Foundation
  * Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxinc.c,v 1.10 2008/10/19 18:55:33 grobian Exp $
+ * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxinc.c,v 1.11 2008/12/30 12:15:32 vapier Exp $
  *
  * Copyright 2005-2007 Ned Ludd        - <solar@gentoo.org>
  * Copyright 2005-2007 Mike Frysinger  - <vapier@gentoo.org>
@@ -84,7 +84,7 @@
 		}
 		len = atoi(ret.buf.formatted.size);
 		/* we will leak this memory */
-		ar->extfn = malloc(sizeof(char) * (len + 1));
+		ar->extfn = xmalloc(sizeof(char) * (len + 1));
 		if (read(ar->fd, ar->extfn, len) != len)
 			goto close_and_ret;
 		ar->extfn[len--] = '\0';



1.11                 pax-utils/paxmacho.c

file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/paxmacho.c?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/paxmacho.c?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/paxmacho.c?r1=1.10&r2=1.11

Index: paxmacho.c
===================================================================
RCS file: /var/cvsroot/gentoo-projects/pax-utils/paxmacho.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- paxmacho.c	30 Dec 2008 12:00:06 -0000	1.10
+++ paxmacho.c	30 Dec 2008 12:15:32 -0000	1.11
@@ -1,7 +1,7 @@
 /*
  * Copyright 2003-2008 Gentoo Foundation
  * Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxmacho.c,v 1.10 2008/12/30 12:00:06 vapier Exp $
+ * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxmacho.c,v 1.11 2008/12/30 12:15:32 vapier Exp $
  *
  * Copyright 2005-2007 Ned Ludd        - <solar@gentoo.org>
  * Copyright 2005-2007 Mike Frysinger  - <vapier@gentoo.org>
@@ -260,7 +260,7 @@
 fatobj *readmacho_buffer(const char *filename, char *buffer, size_t buffer_len)
 {
 	struct fat_header *fhdr;
-	fatobj *ret = malloc(sizeof(fatobj));
+	fatobj *ret = xmalloc(sizeof(fatobj));
 
 	ret->fd = -1;
 	ret->filename = filename;
@@ -299,7 +299,7 @@
 			if (read_mach_header(fobj, ret->data + offset) == 0)
 				return(NULL);
 			if (i < narchs) {
-				fobj = fobj->next = malloc(sizeof(fatobj));
+				fobj = fobj->next = xmalloc(sizeof(fatobj));
 				memset(fobj, 0, sizeof(fatobj));
 				/* filename and size are necessary for printing */
 				fobj->filename = ret->filename;
@@ -340,7 +340,7 @@
  * until the end of the load section. */
 loadcmd *firstloadcmd(fatobj *fobj)
 {
-	loadcmd *ret = malloc(sizeof(loadcmd));
+	loadcmd *ret = xmalloc(sizeof(loadcmd));
 	ret->data = fobj->mhdata +
 		(fobj->ismach64 ? sizeof(struct mach_header_64) : sizeof(struct mach_header));
 	ret->lcmd = (struct load_command*)ret->data;






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-12-30 12:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-30 12:15 [gentoo-commits] gentoo-projects commit in pax-utils: paxinc.c paxmacho.c Mike Frysinger (vapier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox