summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2020-10-28 13:30:24 +0000
committerStefan Eßer <se@FreeBSD.org>2020-10-28 13:30:24 +0000
commite0e29f9425bd15e70c0abb4a6a41c12c49271d4d (patch)
tree708109c67da9a415c31d89ca88a4d0920ed3f842 /usr.bin
parent2939897921f2d10b860c766fb60a398844854351 (diff)
downloadsrc-test-e0e29f9425bd15e70c0abb4a6a41c12c49271d4d.tar.gz
src-test-e0e29f9425bd15e70c0abb4a6a41c12c49271d4d.zip
Fix off-by-one error in processing of #ifdef lines
The convention in this program is to parse the line immediately starting after the token (e.g. #defineA and #ifdefA define respectively look-up "A"), and this commit restores this behavior instead of skipping an assumed white-space character following #ifdef. Reported by: kevans MFC after: 3 days
Notes
Notes: svn path=/head/; revision=367104
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/calendar/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c
index 824ea67f9f0e4..25cf9b5d451a5 100644
--- a/usr.bin/calendar/io.c
+++ b/usr.bin/calendar/io.c
@@ -213,7 +213,7 @@ token(char *line, FILE *out, bool *skip)
}
if (strncmp(line, "ifdef", 5) == 0) {
- walk = line + 6;
+ walk = line + 5;
trimlr(&walk);
if (*walk == '\0') {