summaryrefslogtreecommitdiff
path: root/libiohelp
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2013-07-19 08:53:53 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-07-19 09:28:05 +0200
commit3bbb218e2682de2d566cc66115a108a56c04f42c (patch)
tree05620cacc4657be73b8c6f91324aa65a8ebaf0d2 /libiohelp
parent5534751bfc13761fd87c667cd3f3719575adac2a (diff)
Fix error handling macro E
Previously the macro argument err was expanded and thus potentially evaluated multiple times. This is fine for simple values or pure functions, but not for say iohelp_create_iouser. Fix this by evaluating the macro argument only once.
Diffstat (limited to 'libiohelp')
-rw-r--r--libiohelp/iouser-create.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libiohelp/iouser-create.c b/libiohelp/iouser-create.c
index f1dd2f0e..980c8a1e 100644
--- a/libiohelp/iouser-create.c
+++ b/libiohelp/iouser-create.c
@@ -33,8 +33,9 @@ iohelp_create_iouser (struct iouser **user, struct idvec *uids,
return 0;
}
-#define E(err) \
+#define E(err_) \
do { \
+ error_t err = err_; \
if (err) \
{ \
*user = 0; \