Skip to contentSkip to conversation

liblxc: Remove unused variable

PATCH Applied Matt Helsley 2 participants 2 messages Feb 26, 2009 – Mar 8, 2009 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 liblxc: Remove unused variable

nbargs isn't used for anything in lxc_unshare.c. Remove it.

---
 src/lxc/lxc_unshare.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
src/lxc/lxc_unshare.c +1 -4
Index: lxc/src/lxc/lxc_unshare.c
===================================================================
@@ -76,7 +76,7 @@ static uid_t lookup_user(const char *opt
 
 int main(int argc, char *argv[])
 {
-	int opt, nbargs = 0, status = 1, hastofork = 0;
+	int opt, status = 1, hastofork = 0;
 	char **args;
 	long flags = 0;
  	uid_t uid = -1; /* valid only if (flags & CLONE_NEWUSER) */
@@ -109,12 +109,9 @@ int main(int argc, char *argv[])
 			hastofork = 1;
 			break;
 		}
-
-		nbargs++;
 	}
 
 	args = &argv[optind];
-	argc -= nbargs;
 
 	if (!flags)
 		usage(argv[0]);

A message that is not in the archive (sent off-list or not yet received): 20090226042537.GD11052-r/[email protected]