From: Uwe Hermann Date: Sun, 4 May 2014 18:56:32 +0000 (+0200) Subject: log.c: Avoid using the same name for a variable and enum. X-Git-Tag: libsigrokdecode-0.3.0~11 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=aa6506b86e43d332f839ac1d6e0361ef36e9de75;p=libsigrokdecode.git log.c: Avoid using the same name for a variable and enum. --- diff --git a/log.c b/log.c index 7d3e061..1723a0e 100644 --- a/log.c +++ b/log.c @@ -38,7 +38,7 @@ */ /* Currently selected libsigrokdecode loglevel. Default: SRD_LOG_WARN. */ -static int srd_loglevel = SRD_LOG_WARN; /* Show errors+warnings per default. */ +static int cur_loglevel = SRD_LOG_WARN; /* Show errors+warnings per default. */ /* Function prototype. */ static int srd_logv(void *cb_data, int loglevel, const char *format, @@ -85,7 +85,7 @@ SRD_API int srd_log_loglevel_set(int loglevel) return SRD_ERR_ARG; } - srd_loglevel = loglevel; + cur_loglevel = loglevel; srd_dbg("libsigrokdecode loglevel set to %d.", loglevel); @@ -101,7 +101,7 @@ SRD_API int srd_log_loglevel_set(int loglevel) */ SRD_API int srd_log_loglevel_get(void) { - return srd_loglevel; + return cur_loglevel; } /** @@ -209,7 +209,7 @@ static int srd_logv(void *cb_data, int loglevel, const char *format, (void)cb_data; /* Only output messages of at least the selected loglevel(s). */ - if (loglevel > srd_loglevel) + if (loglevel > cur_loglevel) return SRD_OK; if (srd_log_domain[0] != '\0')