projects
/
pspp-builds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd9a335
)
segment: Fix uninitialized variable in segmenter_parse_comment_2__().
author
Ben Pfaff
<blp@cs.stanford.edu>
Sat, 9 Apr 2011 04:14:13 +0000
(21:14 -0700)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sat, 9 Apr 2011 04:14:13 +0000
(21:14 -0700)
This caused a couple of test failures on Mac OS X.
Thanks to Jeremy Lavergne <jeremy@lavergne.gotdns.org> for reporting
the problem.
src/language/lexer/segment.c
patch
|
blob
|
history
diff --git
a/src/language/lexer/segment.c
b/src/language/lexer/segment.c
index 9900cd7e8513682f84559cfb885dfb8e9f520b34..0d83257959f6b2d6818c01ff03c759b63eaea02a 100644
(file)
--- a/
src/language/lexer/segment.c
+++ b/
src/language/lexer/segment.c
@@
-425,7
+425,7
@@
segmenter_parse_comment_2__ (struct segmenter *s, const char *input, size_t n,
return -1;
if (uc == '+' || uc == '-' || uc == '.')
- new_cmd =
1
;
+ new_cmd =
true
;
else if (!lex_uc_is_space (uc))
switch (s->mode)
{
@@
-442,7
+442,12
@@
segmenter_parse_comment_2__ (struct segmenter *s, const char *input, size_t n,
if (new_cmd < 0)
return -1;
break;
+
+ default:
+ NOT_REACHED ();
}
+ else
+ new_cmd = false;
if (new_cmd)
{