diff options
author | Stef Walter <stefw@gnome.org> | 2013-01-23 14:29:25 +0100 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2013-01-23 14:29:25 +0100 |
commit | b28c936bd281c4b7ff9ed0f621b840f6d5a4b328 (patch) | |
tree | 9645b90b794908d378970aafd73e7726c5267341 /tools | |
parent | 4671352fe2a4f56c6707322dcab0015e2e8600c4 (diff) |
Use the stdbool.h C99 bool type
It was getting really wild knowing whether a function returning
an int would return -1 on failure or 0 or whether the int return
value was actually a number etc..
Diffstat (limited to 'tools')
-rw-r--r-- | tools/p11-kit.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/p11-kit.c b/tools/p11-kit.c index 5bb31ca..f789fb8 100644 --- a/tools/p11-kit.c +++ b/tools/p11-kit.c @@ -47,7 +47,7 @@ #include "p11-kit/uri.h" typedef int (*operation) (int argc, char *argv[]); -int verbose = 0; +bool verbose = false; static void usage (void) @@ -82,7 +82,7 @@ hex_encode (const unsigned char *data, return result; } -static int +static bool is_ascii_string (const unsigned char *data, size_t n_data) { @@ -91,10 +91,10 @@ is_ascii_string (const unsigned char *data, for (i = 0; i < n_data; i++) { if (!isascii (data[i]) && (data[i] < 0x20 && !isspace (data[i]))) - return 0; + return false; } - return 1; + return true; } static void @@ -253,7 +253,7 @@ main (int argc, char *argv[]) oper = list_modules; break; case 'v': - verbose = 1; + verbose = true; putenv ("P11_KIT_DEBUG=all"); break; case 'h': |