From: Jakob Haufe Date: Sat, 21 Oct 2017 15:08:05 +0000 (+0200) Subject: Initialize all variables X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=281c2f3cc82c71d96930e30d0e99a9b0f0532a96;p=sysbacklight Initialize all variables --- diff --git a/sysbacklight.c b/sysbacklight.c index 87a89f9..fe0affd 100644 --- a/sysbacklight.c +++ b/sysbacklight.c @@ -31,8 +31,8 @@ struct sysfs_class_device *find_brightness_device(void) return NULL; } - struct sysfs_class_device *iter; - struct sysfs_attribute *attr; + struct sysfs_class_device *iter=NULL; + struct sysfs_attribute *attr=NULL; dlist_for_each_data(backlights, iter, struct sysfs_class_device) { @@ -104,8 +104,8 @@ int main(int argc, char **argv) { struct sysfs_class_device *dev; - enum OP op; - double value; + enum OP op=INC; + double value=0; dev = find_brightness_device(); if(!dev)