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:
76b6e87
)
argv-parser: Add assertion to find likely bugs in client code.
author
Ben Pfaff
<blp@gnu.org>
Sat, 30 May 2009 04:51:45 +0000
(21:51 -0700)
committer
Ben Pfaff
<blp@gnu.org>
Sun, 7 Jun 2009 04:11:18 +0000
(21:11 -0700)
src/libpspp/argv-parser.c
patch
|
blob
|
history
diff --git
a/src/libpspp/argv-parser.c
b/src/libpspp/argv-parser.c
index b3dc46134a81653a9698269a7da8b0ceec033058..ecf1ab23c74264ba4331ba413e5b14edd4836125 100644
(file)
--- a/
src/libpspp/argv-parser.c
+++ b/
src/libpspp/argv-parser.c
@@
-78,6
+78,7
@@
argv_parser_add_options (struct argv_parser *ap,
ap->options = x2nrealloc (ap->options, &ap->allocated_options,
sizeof *ap->options);
+ assert (src->long_name != NULL || src->short_name != 0);
dst = &ap->options[ap->n_options++];
dst->base = *src;
dst->cb = cb;