The local variable ‘freq’ should be renamed
Opened this issue · 0 comments
tangshaozhu commented
static void iio_spin_button_update_value(struct iio_widget *widget,
const char *src, size_t len)
{
gdouble freq, mag, min, max;
gdouble scale = widget->priv ? *(gdouble *)widget->priv : 1.0;
char *end;
mag = gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget->widget));
gtk_spin_button_get_range(GTK_SPIN_BUTTON(widget->widget), &min, &max);
freq = g_ascii_strtod(src, &end);
...
The local variable ‘freq’ should be renamed, as it may not be necessary to represent frequency. It may cause a bit of confusion for source code reading, and similar conditions should be checked.