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:
Joerg Wunsch 2014-02-27 07:20:32 +00:00
parent e59df50eeb
commit b363c7b710
2 changed files with 8 additions and 3 deletions

View File

@ -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> 2014-02-26 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* jtag3_private.h: Add EDBG/CMSIS-DAP specific constants. * jtag3_private.h: Add EDBG/CMSIS-DAP specific constants.

View File

@ -100,7 +100,7 @@ static int usbdev_open(char * port, union pinfo pinfo, union filedescriptor *fd)
fprintf(stderr, fprintf(stderr,
"%s: usbdev_open(): invalid serial number \"%s\"\n", "%s: usbdev_open(): invalid serial number \"%s\"\n",
progname, serno); progname, serno);
exit(1); return -1;
} }
} }
@ -138,7 +138,7 @@ static int usbdev_open(char * port, union pinfo pinfo, union filedescriptor *fd)
* continue anyway. * continue anyway.
*/ */
if (serno != NULL) if (serno != NULL)
exit(1); /* no chance */ return -1; /* no chance */
else else
strcpy(string, "[unknown]"); 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", fprintf(stderr, "%s: usbdev_open(): did not find any%s USB device \"%s\"\n",
progname, serno? " (matching)": "", port); progname, serno? " (matching)": "", port);
exit(1); return -1;
} }
static void usbdev_close(union filedescriptor *fd) static void usbdev_close(union filedescriptor *fd)