[lxc-devel] [PATCH 2/9] lxc_user_nic: don't pass unused arg to get_username()

Serge Hallyn serge at mail.hallyn.com
Tue Nov 19 16:17:45 UTC 2013


From: Serge Hallyn <serge.hallyn at ubuntu.com>

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
---
 src/lxc/lxc_user_nic.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lxc/lxc_user_nic.c b/src/lxc/lxc_user_nic.c
index c8513ba..da3ae74 100644
--- a/src/lxc/lxc_user_nic.c
+++ b/src/lxc/lxc_user_nic.c
@@ -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);
 	}
-- 
1.8.3.2





More information about the lxc-devel mailing list