unify quotation in error messages

Use quote() from gnulib to do this.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2015-12-04 21:21:13 +00:00
parent d6486e7730
commit 15802d6648
No known key found for this signature in database
GPG key ID: A9553245FDE9B739
4 changed files with 13 additions and 6 deletions

View file

@ -46,6 +46,7 @@
#include "error.h"
#include "progname.h"
#include "quote.h"
#include "dhcpd-pools.h"
@ -236,8 +237,11 @@ comparer_t field_selector(char c)
case 'e':
return comp_tcperc;
default:
clean_up();
error(EXIT_FAILURE, 0, "field_selector: unknown sort order `%c'", c);
{
char str[2] = { c, '\0' };
clean_up();
error(EXIT_FAILURE, 0, "field_selector: unknown sort order: %s", quote(str));
}
}
return NULL;
}