]> granicus.if.org Git - shadow/commitdiff
* src/groupmems.c: Use xstrdup() rather than strdup().
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 27 Jul 2008 22:30:22 +0000 (22:30 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 27 Jul 2008 22:30:22 +0000 (22:30 +0000)
ChangeLog
src/groupmems.c

index 9aa18c61a83ce07ca4e0cb04b20ff3b0953b01c3..871783da76058523be97190b9f38bfadab3027f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-07-27  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/groupmems.c: Use xstrdup() rather than strdup().
+
 2008-07-27  Nicolas François  <nicolas.francois@centraliens.net>
 
        * src/groupmems.c: Add parenthesis.
index 97a319a19e07dc8afaa03b7407b097fb6437cfc9..e68d687281d3582afd388e3fd7d77c55f678da27 100644 (file)
@@ -86,7 +86,7 @@ static char *whoami (void)
        struct passwd *usr = getpwuid (getuid ());
 
        if (0 == strcmp (usr->pw_name, grp->gr_name)) {
-               return strdup (usr->pw_name);
+               return xstrdup (usr->pw_name);
        } else {
                return NULL;
        }
@@ -133,11 +133,11 @@ static void process_flags (int argc, char **argv)
                                   &option_index)) != EOF) {
                switch (arg) {
                case 'a':
-                       adduser = strdup (optarg);
+                       adduser = xstrdup (optarg);
                        ++exclusive;
                        break;
                case 'd':
-                       deluser = strdup (optarg);
+                       deluser = xstrdup (optarg);
                        ++exclusive;
                        break;
                case 'p':
@@ -145,7 +145,7 @@ static void process_flags (int argc, char **argv)
                        ++exclusive;
                        break;
                case 'g':
-                       thisgroup = strdup (optarg);
+                       thisgroup = xstrdup (optarg);
                        break;
                case 'l':
                        list = true;