mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-27 14:35:27 +00:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user