summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/internal/stdio_impl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/internal/stdio_impl.h b/src/internal/stdio_impl.h
index 7cdf729d..1127a492 100644
--- a/src/internal/stdio_impl.h
+++ b/src/internal/stdio_impl.h
@@ -9,7 +9,7 @@
#define FFINALLOCK(f) ((f)->lock>=0 ? __lockfile((f)) : 0)
#define FLOCK(f) int __need_unlock = ((f)->lock>=0 ? __lockfile((f)) : 0)
-#define FUNLOCK(f) if (__need_unlock) __unlockfile((f)); else
+#define FUNLOCK(f) do { if (__need_unlock) __unlockfile((f)); } while (0)
#define F_PERM 1
#define F_NORD 4