mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-15 18:21:07 +00:00
Removing exit calls from config parser
* config.h: cleanup, left only internally needed definitions * config.c: removed exit calls, use yyerror and yywarning * config_gram.y: (Dito.) * lexer.l: (Dito.) * libavrdude.h: removed internal definitions of config parser * main.c: removed yyerror, it is now in config.c * jtagmkII.c: added missing free in error case * pgm.c: replaced exits by returns * pickit2.c: add missing return git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1322 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
4
pgm.c
4
pgm.c
@@ -70,7 +70,7 @@ PROGRAMMER * pgm_new(void)
|
||||
if (pgm == NULL) {
|
||||
avrdude_message(MSG_INFO, "%s: out of memory allocating programmer structure\n",
|
||||
progname);
|
||||
exit(1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memset(pgm, 0, sizeof(*pgm));
|
||||
@@ -161,7 +161,7 @@ PROGRAMMER * pgm_dup(const PROGRAMMER * const src)
|
||||
if (pgm == NULL) {
|
||||
avrdude_message(MSG_INFO, "%s: out of memory allocating programmer structure\n",
|
||||
progname);
|
||||
exit(1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memcpy(pgm, src, sizeof(*pgm));
|
||||
|
||||
Reference in New Issue
Block a user