lkml.org 
[lkml]   [2018]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 9/9] um/drivers/vector_user: Delete an unnecessary variable initialisation in user_init_tap_fds()
From
Date
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 11 Mar 2018 15:50:29 +0100

The local variable "fd" will eventually be set to an appropriate value
a bit later. Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
arch/um/drivers/vector_user.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/um/drivers/vector_user.c b/arch/um/drivers/vector_user.c
index bd625034a0f0..3bd510eded58 100644
--- a/arch/um/drivers/vector_user.c
+++ b/arch/um/drivers/vector_user.c
@@ -119,9 +119,8 @@ struct arglist *uml_parse_vector_ifspec(char *arg)
static struct vector_fds *user_init_tap_fds(struct arglist *ifspec)
{
struct ifreq ifr;
- int fd = -1;
struct sockaddr_ll sock;
- int err = -ENOMEM, offload;
+ int err = -ENOMEM, fd, offload;
char *iface;
struct vector_fds *result;

--
2.16.2
\
 
 \ /
  Last update: 2018-03-11 16:25    [W:0.065 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site