In usbdev_open(), replace all calls to exit(1) by return -1.
git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1279 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
e59df50eeb
commit
b363c7b710
|
@ -1,3 +1,8 @@
|
|||
2014-02-27 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||
|
||||
* usb_libusb.c (usbdev_open): Replace all calls to exit(1) by
|
||||
return -1
|
||||
|
||||
2014-02-26 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
|
||||
|
||||
* jtag3_private.h: Add EDBG/CMSIS-DAP specific constants.
|
||||
|
|
|
@ -100,7 +100,7 @@ static int usbdev_open(char * port, union pinfo pinfo, union filedescriptor *fd)
|
|||
fprintf(stderr,
|
||||
"%s: usbdev_open(): invalid serial number \"%s\"\n",
|
||||
progname, serno);
|
||||
exit(1);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ static int usbdev_open(char * port, union pinfo pinfo, union filedescriptor *fd)
|
|||
* continue anyway.
|
||||
*/
|
||||
if (serno != NULL)
|
||||
exit(1); /* no chance */
|
||||
return -1; /* no chance */
|
||||
else
|
||||
strcpy(string, "[unknown]");
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ static int usbdev_open(char * port, union pinfo pinfo, union filedescriptor *fd)
|
|||
|
||||
fprintf(stderr, "%s: usbdev_open(): did not find any%s USB device \"%s\"\n",
|
||||
progname, serno? " (matching)": "", port);
|
||||
exit(1);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void usbdev_close(union filedescriptor *fd)
|
||||
|
|
Loading…
Reference in New Issue