From: Uwe Hermann Date: Sun, 22 Jul 2018 14:37:58 +0000 (+0200) Subject: strutil.c: Use gboolean in favor of bool for consistency. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0f5bba9622cc4d1ac934d1534fe2196f9b203ad6;p=libsigrok.git strutil.c: Use gboolean in favor of bool for consistency. --- diff --git a/src/strutil.c b/src/strutil.c index b6c910f7..73c9fc6a 100644 --- a/src/strutil.c +++ b/src/strutil.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include "libsigrok-internal.h" @@ -614,8 +613,8 @@ SR_API int sr_parse_rational(const char *str, struct sr_rational *ret) int64_t denominator = 1; int32_t fractional_len = 0; int32_t exponent = 0; - bool is_negative = false; - bool no_integer, no_fractional; + gboolean is_negative = FALSE; + gboolean no_integer, no_fractional; while (isspace(*str)) str++; @@ -625,21 +624,21 @@ SR_API int sr_parse_rational(const char *str, struct sr_rational *ret) if (str == endptr && (str[0] == '-' || str[0] == '+') && str[1] == '.') { endptr += 1; - no_integer = true; + no_integer = TRUE; } else if (str == endptr && str[0] == '.') { - no_integer = true; + no_integer = TRUE; } else if (errno) { return SR_ERR; } else { - no_integer = false; + no_integer = FALSE; } if (integral < 0 || str[0] == '-') - is_negative = true; + is_negative = TRUE; errno = 0; if (*endptr == '.') { - bool is_exp, is_eos; + gboolean is_exp, is_eos; const char *start = endptr + 1; fractional = g_ascii_strtoll(start, &endptr, 10); is_exp = *endptr == 'E' || *endptr == 'e';