summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9236008)
The NULL character is used to indicate that no short option is
available for a given command.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
- optstring[str_pos++] = (char)long_options[i].val;
- if (long_options[i].has_arg) {
- optstring[str_pos++] = ':';
+ if (long_options[i].val != '\0') {
+ optstring[str_pos++] = (char) long_options[i].val;
+ if (long_options[i].has_arg) {
+ optstring[str_pos++] = ':';
+ }