lib/util.c: make is_revision match the code style

This commit is contained in:
Duncan Overbruck 2021-06-26 17:14:23 +02:00
parent 46b7057d91
commit c00fe9f3e1
No known key found for this signature in database
GPG Key ID: 335C1D17EC3D6E35

View File

@ -50,15 +50,15 @@
#pragma clang diagnostic ignored "-Wformat-nonliteral" #pragma clang diagnostic ignored "-Wformat-nonliteral"
#endif #endif
static bool is_revision(const char *str) { static bool
if (str == NULL || str[0] == '\0'){ is_revision(const char *str)
{
if (str == NULL || *str == '\0')
return false; return false;
}
/* allow underscore for accepting perl-Digest-1.17_01_1 etc. */ /* 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; ++str;
} return *str == '\0';
return str[0] == '\0';
} }
/** /**