projects
/
emu8051.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3a89081
)
Fix warning for ignored return value for getline()
author
Hugo Villeneuve
<hugo@hugovil.com>
Fri, 3 Jan 2014 08:19:32 +0000
(
03:19
-0500)
committer
Hugo Villeneuve
<hugo@hugovil.com>
Fri, 3 Jan 2014 08:19:32 +0000
(
03:19
-0500)
src/cli/emuconsole.c
patch
|
blob
|
history
diff --git
a/src/cli/emuconsole.c
b/src/cli/emuconsole.c
index
1e53620
..
ab85975
100644
(file)
--- a/
src/cli/emuconsole.c
+++ b/
src/cli/emuconsole.c
@@
-305,6
+305,7
@@
console_main(void)
while (!QuitRequest) {
int slen;
size_t len = 0;
while (!QuitRequest) {
int slen;
size_t len = 0;
+ int rc;
char Command[256];
char Args[256];
char Parameter1[256];
char Command[256];
char Args[256];
char Parameter1[256];
@@
-314,7
+315,10
@@
console_main(void)
Parameter2[0] = '\0';
printf("%s", prompt);
Parameter2[0] = '\0';
printf("%s", prompt);
- (void) getline(&line, &len, stdin);
+ rc = getline(&line, &len, stdin);
+ if (rc < 0)
+ goto syntax_error;
+
Capitalize(line);
RemoveSpaces(line);
Capitalize(line);
RemoveSpaces(line);