From 41c93065da59bcb0b5adada40fbb135e54fa679f Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 9 Jan 2011 11:38:55 +0000 Subject: [PATCH] * transcode.c: parenthesize macro arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ transcode.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d37743d682..0f7d8d6391 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Jan 9 20:37:21 2011 Tanaka Akira + + * transcode.c: parenthesize macro arguments. + Sun Jan 9 16:31:53 2011 Yuki Sonoda (Yugui) * io.c (Kernel.#syscall): implemented on LP64/LLP64 environments too. diff --git a/transcode.c b/transcode.c index 7760549166..e7f09a434e 100644 --- a/transcode.c +++ b/transcode.c @@ -234,7 +234,7 @@ rb_declare_transcoder(const char *enc1, const char *enc2, const char *lib) declare_transcoder(enc1, enc2, lib); } -#define encoding_equal(enc1, enc2) (STRCASECMP(enc1, enc2) == 0) +#define encoding_equal(enc1, enc2) (STRCASECMP((enc1), (enc2)) == 0) typedef struct search_path_queue_tag { struct search_path_queue_tag *next; @@ -452,7 +452,7 @@ transcode_restartable0(const unsigned char **in_pos, unsigned char **out_pos, tc->recognized_len -= readagain_len; \ tc->readagain_len = readagain_len; \ } \ - return ret; \ + return (ret); \ resume_label ## num:; \ } while (0) #define SUSPEND_OBUF(num) \