]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc_user_nic: don't pass unused arg to get_username()
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 19 Nov 2013 16:17:45 +0000 (16:17 +0000)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 19 Nov 2013 22:26:22 +0000 (16:26 -0600)
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxc_user_nic.c

index c8513ba83b1b6b76d30bdd50e342ad5871028d40..da3ae74d4718f4dee8f39b23c852e0e530faad69 100644 (file)
@@ -122,7 +122,7 @@ int open_and_lock(char *path)
 }
 
 
-char *get_username(char **buf)
+char *get_username(void)
 {
        struct passwd *pwd = getpwuid(getuid());
 
@@ -901,13 +901,13 @@ int main(int argc, char *argv[])
 {
        int n, fd;
        bool gotone = false;
-       char *me, *buf = alloca(400);
+       char *me;
        char *nicname = alloca(40);
        char *cnic; // created nic name in container is returned here.
        char *vethname;
        int pid;
 
-       if ((me = get_username(&buf)) == NULL) {
+       if ((me = get_username()) == NULL) {
                fprintf(stderr, "Failed to get username\n");
                exit(1);
        }