tools/list: print an empty string for null vendor strings

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
master
Peter Hutterer 2021-11-10 14:45:53 +10:00
parent abb115c78f
commit 50a24569b8
1 changed files with 2 additions and 1 deletions

View File

@ -140,11 +140,12 @@ main(int argc, char **argv)
m = rxkb_model_first(ctx);
assert(m); /* Empty model list is usually a bug or a bad xml file */
while (m) {
const char *vendor = rxkb_model_get_vendor(m);
printf("- name: %s\n"
" vendor: %s\n"
" description: %s\n",
rxkb_model_get_name(m),
rxkb_model_get_vendor(m),
vendor ? vendor : "''",
rxkb_model_get_description(m));
m = rxkb_model_next(m);
}