summaryrefslogtreecommitdiffstats
path: root/Modules/cjkcodecs/cjkcodecs.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-10-28 23:59:44 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-10-28 23:59:44 (GMT)
commit28c63f7ffb9f9cb59c524dc14ce66d34c0e83af6 (patch)
treeaa72609ba7c6890975638f7c63f4ca587697fb47 /Modules/cjkcodecs/cjkcodecs.h
parent14c9fea60aa6884586c0a87046b308c2af76d38d (diff)
downloadcpython-28c63f7ffb9f9cb59c524dc14ce66d34c0e83af6.zip
cpython-28c63f7ffb9f9cb59c524dc14ce66d34c0e83af6.tar.gz
cpython-28c63f7ffb9f9cb59c524dc14ce66d34c0e83af6.tar.bz2
CJK codecs: less magical macros, semicolon is now explicit
Diffstat (limited to 'Modules/cjkcodecs/cjkcodecs.h')
-rw-r--r--Modules/cjkcodecs/cjkcodecs.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/cjkcodecs/cjkcodecs.h b/Modules/cjkcodecs/cjkcodecs.h
index 2aedf25..25bab41 100644
--- a/Modules/cjkcodecs/cjkcodecs.h
+++ b/Modules/cjkcodecs/cjkcodecs.h
@@ -113,8 +113,11 @@ static const struct dbcs_map *mapping_list;
} while (0)
#define REQUIRE_INBUF(n) \
- if (inleft < (n)) \
- return MBERR_TOOFEW;
+ do { \
+ if (inleft < (n)) \
+ return MBERR_TOOFEW; \
+ } while (0)
+
#define REQUIRE_OUTBUF(n) \
do { \
if (outleft < (n)) \