[PATCH 4/5] chfn: use xalloc lib

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Davidlohr Bueso <dave@xxxxxxx>

Signed-off-by: Davidlohr Bueso <dave@xxxxxxx>
---
 login-utils/chfn.c |   18 +-----------------
 1 files changed, 1 insertions(+), 17 deletions(-)

diff --git a/login-utils/chfn.c b/login-utils/chfn.c
index ef0a746..0da630d 100644
--- a/login-utils/chfn.c
+++ b/login-utils/chfn.c
@@ -38,6 +38,7 @@
 #include "setpwnam.h"
 #include "strutils.h"
 #include "nls.h"
+#include "xalloc.h"
 #include "env.h"
 
 #ifdef HAVE_LIBSELINUX
@@ -87,7 +88,6 @@ static char *prompt (char *question, char *def_val);
 static int check_gecos_string (char *msg, char *gecos);
 static boolean set_changed_data (struct finfo *oldfp, struct finfo *newfp);
 static int save_new_data (struct finfo *pinfo);
-static void *xmalloc (int bytes);
 
 #define memzero(ptr, size) memset((char *) ptr, 0, size)
 
@@ -514,19 +514,3 @@ static int save_new_data (pinfo)
     printf (_("Finger information changed.\n"));
     return 0;
 }
-
-/*
- *  xmalloc () -- malloc that never fails.
- */
-static void *xmalloc (bytes)
-    int bytes;
-{
-    void *vp;
-
-    vp = malloc (bytes);
-    if (! vp && bytes > 0) {
-	perror (_("malloc failed"));
-	exit (-1);
-    }
-    return vp;
-}
-- 
1.7.1




--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux