From: Antonio Ospite Date: Tue, 5 Jan 2016 22:25:43 +0000 (+0100) Subject: kinect_upload_fw: return -errno when fopen fails X-Git-Tag: v0.4~3 X-Git-Url: https://git.ao2.it/kinect-audio-setup.git/commitdiff_plain/bd345d96fa9c37efafe5173092bfc588a14c6669 kinect_upload_fw: return -errno when fopen fails This way all the error paths return negative codes. --- 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);