summaryrefslogtreecommitdiffstats
path: root/include/env.h
diff options
context:
space:
mode:
authorSami Kerola2016-08-07 08:27:21 +0200
committerSami Kerola2016-08-12 22:25:36 +0200
commit984a60965a0e3cd3253a74c77af916b05381c03d (patch)
tree8aafe4e47b256298b2ed294dbdcdc50c59c730bf /include/env.h
parenttests: mark build-in paths test as optional (diff)
downloadkernel-qcow2-util-linux-984a60965a0e3cd3253a74c77af916b05381c03d.tar.gz
kernel-qcow2-util-linux-984a60965a0e3cd3253a74c77af916b05381c03d.tar.xz
kernel-qcow2-util-linux-984a60965a0e3cd3253a74c77af916b05381c03d.zip
misc: always check setenv(3) return value
At least glibc setenv(3) can fail when system runs out of memory. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'include/env.h')
-rw-r--r--include/env.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/env.h b/include/env.h
index a53d31027..ff5fc796e 100644
--- a/include/env.h
+++ b/include/env.h
@@ -9,7 +9,7 @@ extern char *safe_getenv(const char *arg);
static inline void xsetenv(char const *name, char const *val, int overwrite)
{
if (setenv(name, val, overwrite) != 0)
- err(EXIT_FAILURE, "failed to set the %s environment variable", name);
+ err(EXIT_FAILURE, _("failed to set the %s environment variable"), name);
}
#endif /* UTIL_LINUX_ENV_H */