From 5d352563bd3a8d1c6bc07969a5fefe7ddf6bf1c6 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 28 Nov 2012 14:25:50 -0200 Subject: [PATCH] Use bool instead of int Also change the last field initializer in array to be empty. --- libkmod/libkmod-util.c | 4 ++-- libkmod/libkmod-util.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libkmod/libkmod-util.c b/libkmod/libkmod-util.c index 05a26cc8..71bf51d6 100644 --- a/libkmod/libkmod-util.c +++ b/libkmod/libkmod-util.c @@ -316,10 +316,10 @@ const struct kmod_ext kmod_exts[] = { #ifdef ENABLE_XZ {".ko.xz", sizeof(".ko.xz") - 1}, #endif - {NULL, 0}, + { } }; -int path_ends_with_kmod_ext(const char *path, size_t len) +bool path_ends_with_kmod_ext(const char *path, size_t len) { const struct kmod_ext *eitr; diff --git a/libkmod/libkmod-util.h b/libkmod/libkmod-util.h index 36192d90..258184d4 100644 --- a/libkmod/libkmod-util.h +++ b/libkmod/libkmod-util.h @@ -28,7 +28,7 @@ extern const struct kmod_ext { size_t len; } kmod_exts[]; #define KMOD_EXT_UNC 0 -int path_ends_with_kmod_ext(const char *path, size_t len) __attribute__((nonnull(1))); +bool path_ends_with_kmod_ext(const char *path, size_t len) __attribute__((nonnull(1))); unsigned long long stat_mstamp(const struct stat *st); unsigned long long ts_usec(const struct timespec *ts); -- 2.47.2