diff options
Diffstat (limited to 'ntpd/ntp_scanner.c')
| -rw-r--r-- | ntpd/ntp_scanner.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/ntpd/ntp_scanner.c b/ntpd/ntp_scanner.c index 42b83c84eec6..08c203c63e8a 100644 --- a/ntpd/ntp_scanner.c +++ b/ntpd/ntp_scanner.c @@ -73,17 +73,26 @@ keyword( { size_t i; const char *text; + static char sbuf[64]; i = token - LOWEST_KEYWORD_ID; - if (i < COUNTOF(keyword_text)) - text = keyword_text[i]; - else - text = NULL; + switch (token) { + case T_ServerresponseFuzz: + text = "serverresponse fuzz"; + break; + + default: + if (i < COUNTOF(keyword_text)) { + text = keyword_text[i]; + } else { + snprintf(sbuf, sizeof sbuf, + "(keyword #%u not found)", token); + text = sbuf; + } + } - return (text != NULL) - ? text - : "(keyword not found)"; + return text; } |
