From 9bfc52c1091c871cbc58390874b5c4ebe266bee0 Mon Sep 17 00:00:00 2001 From: Fabian Frederick Date: Thu, 23 Oct 2014 18:19:35 +0200 Subject: 9p: remove unused variable in p9_fd_create() p is initialized but unused. Signed-off-by: Fabian Frederick Signed-off-by: Dominique Martinet Signed-off-by: Eric Van Hensbergen --- net/9p/trans_fd.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'net/9p/trans_fd.c') diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c index 80d08f6664cb..c73b894846c1 100644 --- a/net/9p/trans_fd.c +++ b/net/9p/trans_fd.c @@ -1013,7 +1013,6 @@ p9_fd_create(struct p9_client *client, const char *addr, char *args) { int err; struct p9_fd_opts opts; - struct p9_trans_fd *p; parse_opts(args, &opts); @@ -1026,7 +1025,6 @@ p9_fd_create(struct p9_client *client, const char *addr, char *args) if (err < 0) return err; - p = (struct p9_trans_fd *) client->trans; p9_conn_create(client); return 0; -- cgit From b99baa43e533eb62a947e623d0ef844cfbf28d8e Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Fri, 9 Jan 2015 13:05:56 +0100 Subject: net/9p: Initialize opts->privport as it should be. We're currently using an uninitialized value if option privport is not set, thus (almost) always using a privileged port. Signed-off-by: Dominique Martinet Signed-off-by: Eric Van Hensbergen --- net/9p/trans_fd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'net/9p/trans_fd.c') diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c index c73b894846c1..154479d2756d 100644 --- a/net/9p/trans_fd.c +++ b/net/9p/trans_fd.c @@ -734,6 +734,7 @@ static int parse_opts(char *params, struct p9_fd_opts *opts) opts->port = P9_PORT; opts->rfd = ~0; opts->wfd = ~0; + opts->privport = 0; if (!params) return 0; -- cgit