projects
/
platform
/
upstream
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f7d33d
)
weston-launch: On error putenv returns a non-zero value
author
Dawid Gajownik
<gajownik@gmail.com>
Sun, 9 Aug 2015 15:50:40 +0000
(12:50 -0300)
committer
Bryce Harrington
<bryce@osg.samsung.com>
Mon, 10 Aug 2015 22:28:46 +0000
(15:28 -0700)
According to POSIX standard "upon successful completion, putenv() shall
return 0; otherwise, it shall return a non-zero value." Unlike in
setenv() we should not be checking only for negative values.
Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
src/weston-launch.c
patch
|
blob
|
history
diff --git
a/src/weston-launch.c
b/src/weston-launch.c
index
90a070f
..
b8dfb17
100644
(file)
--- a/
src/weston-launch.c
+++ b/
src/weston-launch.c
@@
-603,7
+603,7
@@
setup_session(struct weston_launch *wl)
env = pam_getenvlist(wl->ph);
if (env) {
for (i = 0; env[i]; ++i) {
- if (putenv(env[i])
<
0)
+ if (putenv(env[i])
!=
0)
error(0, 0, "putenv %s failed", env[i]);
}
free(env);