From: Johannes Berg Date: Fri, 3 May 2013 11:22:45 +0000 (+0200) Subject: fix compiler warning X-Git-Tag: v2.31-rc1~98^2~13^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dac08a7c92ce48c2f1325af6f498a8de9ab9377e;p=thirdparty%2Futil-linux.git fix compiler warning --- diff --git a/rfkill.c b/rfkill.c index b2672ee3cd..8cd81fed9c 100644 --- 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)