kinect_upload_fw: return -errno when fopen fails
[kinect-audio-setup.git] / kinect_upload_fw / kinect_upload_fw.c
index d56e0c4..223595d 100644 (file)
@@ -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));
        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);
        }
 
        libusb_init(NULL);