logger: make code more robust for static analyzer [clang scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2019-05-23 12:14:10 +02:00
parent ac255c2b14
commit 7241dda191
1 changed files with 2 additions and 0 deletions

View File

@ -218,6 +218,8 @@ static int pencode(char *s)
int facility, level;
char *separator;
assert(s);
separator = strchr(s, '.');
if (separator) {
*separator = '\0';