]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fix compiler warning
authorJohannes Berg <johannes@sipsolutions.net>
Fri, 3 May 2013 11:22:45 +0000 (13:22 +0200)
committerJohannes Berg <johannes@sipsolutions.net>
Fri, 3 May 2013 11:22:45 +0000 (13:22 +0200)
rfkill.c

index b2672ee3cd4ed9d7aa5ddb84ef33a2536d2b01f5..8cd81fed9c37e730aa5d27c2b0c95f582b1beb01 100644 (file)
--- a/rfkill.c
+++ b/rfkill.c
@@ -68,8 +68,7 @@ static void rfkill_event(void)
 
 static const char *get_name(__u32 idx)
 {
-       static char name[128];
-       ssize_t len;
+       static char name[128] = {};
        char *pos, filename[64];
        int fd;
 
@@ -81,7 +80,7 @@ static const char *get_name(__u32 idx)
                return NULL;
 
        memset(name, 0, sizeof(name));
-       len = read(fd, name, sizeof(name) - 1);
+       read(fd, name, sizeof(name) - 1);
 
        pos = strchr(name, '\n');
        if (pos)