projects
/
profile
/
ivi
/
weston-ivi-shell.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26e009c
)
backlight: Remove unnecessary and confusing NULL checks
author
Rob Bradford
<rob@linux.intel.com>
Wed, 5 Dec 2012 18:47:06 +0000
(18:47 +0000)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Fri, 7 Dec 2012 03:32:07 +0000
(22:32 -0500)
At this point path must point to an allocated string since otherwise the
asprintf that makes the allocation would have failed and we would have
returned earlier.
src/libbacklight.c
patch
|
blob
|
history
diff --git
a/src/libbacklight.c
b/src/libbacklight.c
index
df811b4
..
2ac135a
100644
(file)
--- a/
src/libbacklight.c
+++ b/
src/libbacklight.c
@@
-69,8
+69,7
@@
static long backlight_get(struct backlight *backlight, char *node)
ret = value;
out:
close(fd);
- if (path)
- free(path);
+ free(path);
return ret;
}
@@
-127,8
+126,7
@@
long backlight_set_brightness(struct backlight *backlight, long brightness)
out:
if (buffer)
free(buffer);
- if (path)
- free(path);
+ free(path);
close(fd);
return ret;
}