lib: fix show error all

show error all was displaying 0 value for code, whereas real code value
was not displayed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
Philippe Guibert 2018-08-21 11:09:36 +02:00
parent f8a523363e
commit b2111f08a5

View File

@ -146,7 +146,7 @@ void log_ref_display(struct vty *vty, uint32_t code, bool json)
char ubuf[256];
snprintf(pbuf, sizeof(pbuf), "\nError %"PRIu32" - %s",
code, ref->title);
ref->code, ref->title);
memset(ubuf, '=', strlen(pbuf));
ubuf[sizeof(ubuf) - 1] = '\0';