X-Git-Url: http://git.droids-corp.org/?p=libcmdline.git;a=blobdiff_plain;f=src%2Flib%2Fcmdline_parse.c;h=ceb22d620c1e1722634041b713c95ced797de946;hp=513c9f03e3c52aa34743f130ef49d5d40ff4bbca;hb=0c04fc6ac5c90753ff582486e2602b7ed429623d;hpb=0a09866300194a46a58ff4dc0b837e01305f4444 diff --git a/src/lib/cmdline_parse.c b/src/lib/cmdline_parse.c index 513c9f0..ceb22d6 100644 --- a/src/lib/cmdline_parse.c +++ b/src/lib/cmdline_parse.c @@ -312,7 +312,7 @@ match_inst(cmdline_parse_inst_t *inst, const char *linebuf, linebuf++; /* end of buf, we match all inst */ - if (isendofline(*linebuf) || iscomment(*linebuf)) + if (*linebuf == '\0' || isendofline(*linebuf) || iscomment(*linebuf)) return 0; /* garbage after inst */ @@ -489,7 +489,7 @@ int cmdline_help(cmdline_parse_ctx_t *ctx, const char *buf, /* end of inst */ if (token == NULL) { - n = snprintf(helpbuf, sizeof(helpbuf), "[RETURN]\n"); + n = snprintf(helpbuf, sizeof(helpbuf), "[Return]\n"); if (n > 0) write_buf(opaque, helpbuf, n); continue;