summaryrefslogtreecommitdiff
path: root/usb-linux.c
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill@shutemov.name>2010-01-20 00:56:17 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-26 14:59:20 -0600
commit9f99cee7fa88af069cb583b0feb8c7910455b218 (patch)
tree5b185ddd2307c4d84b4b21f1a6bd1d8c3f1ebbf2 /usb-linux.c
parent5a01e99fab34b2ec70148b8b92614158cca30800 (diff)
usb-linux.c: fix warning with _FORTIFY_SOURCE
CC usb-linux.o cc1: warnings being treated as errors usb-linux.c: In function 'usb_host_read_file': usb-linux.c:1204: error: ignoring return value of 'fgets', declared with attribute warn_unused_result make: *** [usb-linux.o] Error 1 Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'usb-linux.c')
-rw-r--r--usb-linux.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usb-linux.c b/usb-linux.c
index 5619b30600..1aaa5950f5 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -1201,9 +1201,8 @@ static int usb_host_read_file(char *line, size_t line_size, const char *device_f
device_file);
f = fopen(filename, "r");
if (f) {
- fgets(line, line_size, f);
+ ret = fgets(line, line_size, f) != NULL;
fclose(f);
- ret = 1;
#if 0
} else {
if (mon)