summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzu-ping Chung <uranusjr@gmail.com>2014-08-10 23:11:51 +0800
committerTzu-ping Chung <uranusjr@gmail.com>2014-08-10 23:11:51 +0800
commite3cbd4be4ee5c2126074102d64b68dcd3be72206 (patch)
tree58b98c68ee7f0f6562fe84a58a76cc48ac16f4eb
parent753e4d892c0ca8ad41b84d676bdafe55843832aa (diff)
downloadrust-hoedown-e3cbd4be4ee5c2126074102d64b68dcd3be72206.tar.gz
Make return statement of is_escaped more succinct
-rw-r--r--src/document.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/document.c b/src/document.c
index 7927abf..ebdd979 100644
--- a/src/document.c
+++ b/src/document.c
@@ -474,9 +474,7 @@ is_escaped(uint8_t *data, size_t loc)
i--;
/* odd numbers of backslashes escapes data[loc] */
- if ((loc - i) % 2)
- return 1;
- return 0;
+ return (loc - i) % 2;
}
/* find_emph_char • looks for the next emph uint8_t, skipping other constructs */