From c00fe9f3e1da76b30a3f66b26f2c2f1d348df7c5 Mon Sep 17 00:00:00 2001 From: Duncan Overbruck Date: Sat, 26 Jun 2021 17:14:23 +0200 Subject: [PATCH] lib/util.c: make is_revision match the code style --- lib/util.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/util.c b/lib/util.c index 3de8bf3c..444fef41 100644 --- a/lib/util.c +++ b/lib/util.c @@ -50,15 +50,15 @@ #pragma clang diagnostic ignored "-Wformat-nonliteral" #endif -static bool is_revision(const char *str) { - if (str == NULL || str[0] == '\0'){ +static bool +is_revision(const char *str) +{ + if (str == NULL || *str == '\0') return false; - } /* allow underscore for accepting perl-Digest-1.17_01_1 etc. */ - while (isdigit((unsigned char)str[0]) || str[0] == '_') { + while (isdigit((unsigned char)*str) || *str == '_') ++str; - } - return str[0] == '\0'; + return *str == '\0'; } /**