From: Lucas De Marchi Date: Wed, 28 Nov 2012 16:25:50 +0000 (-0200) Subject: Use bool instead of int X-Git-Tag: v12~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d352563bd3a8d1c6bc07969a5fefe7ddf6bf1c6;p=thirdparty%2Fkmod.git Use bool instead of int Also change the last field initializer in array to be empty. --- 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);