From 281c2f3cc82c71d96930e30d0e99a9b0f0532a96 Mon Sep 17 00:00:00 2001 From: Jakob Haufe Date: Sat, 21 Oct 2017 17:08:05 +0200 Subject: [PATCH] Initialize all variables --- sysbacklight.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) -- 2.39.2