summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-12-12 02:10:19 -0500
committerNick Mathewson <nickm@torproject.org>2009-12-12 02:10:19 -0500
commit9e6225ae1662e10f3e6c32af52736b60eb489b55 (patch)
tree58bd66dc3650837882fcea828c3c5817a15e449c /src/or/config.c
parent0c1b3070cfec670190636d74f97c2aaf0e521bdb (diff)
parentf1b7295b27ba1f472304f2931bb23df6884b64e6 (diff)
downloadtor-9e6225ae1662e10f3e6c32af52736b60eb489b55.tar.gz
tor-9e6225ae1662e10f3e6c32af52736b60eb489b55.zip
Merge commit 'sebastian/coverity'
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 416cbc1302..deeda163b6 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1575,7 +1575,10 @@ config_get_commandlines(int argc, char **argv, config_line_t **result)
*new = tor_malloc_zero(sizeof(config_line_t));
s = argv[i];
- while (*s == '-')
+ /* Each keyword may be prefixed with one or two dashes. */
+ if (*s == '-')
+ s++;
+ if (*s == '-')
s++;
(*new)->key = tor_strdup(expand_abbrev(&options_format, s, 1, 1));