util/os_file: fix error being sign-cast back and forth
authorEric Engestrom <eric.engestrom@intel.com>
Thu, 16 May 2019 12:08:53 +0000 (13:08 +0100)
committerEric Engestrom <eric@engestrom.ch>
Sun, 9 Jun 2019 13:14:13 +0000 (13:14 +0000)
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/util/os_file.c

index 400a2a12c4dd79de36fdf43632c2110115f924de..6e78a231d67cbe87ec072c8c304a15b3739d8f4c 100644 (file)
@@ -37,7 +37,7 @@ readN(int fd, char *buf, size_t len)
       total += ret;
    } while (total != len);
 
-   return total ? total : err;
+   return total ? (ssize_t)total : err;
 }
 
 char *