From bd345d96fa9c37efafe5173092bfc588a14c6669 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Tue, 5 Jan 2016 23:25:43 +0100 Subject: [PATCH 1/1] kinect_upload_fw: return -errno when fopen fails This way all the error paths return negative codes. --- kinect_upload_fw/kinect_upload_fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kinect_upload_fw/kinect_upload_fw.c b/kinect_upload_fw/kinect_upload_fw.c index d56e0c4..223595d 100644 --- a/kinect_upload_fw/kinect_upload_fw.c +++ b/kinect_upload_fw/kinect_upload_fw.c @@ -256,7 +256,7 @@ int main(int argc, char *argv[]) { FILE *fw = fopen(filename, "rb"); if (fw == NULL) { fprintf(stderr, "Failed to open %s: %s\n", filename, strerror(errno)); - return errno; + return -errno; } libusb_init(NULL); -- 2.1.4