Skip to content

Commit

Permalink
apr_getopt: Fix error message. The "-" is the invalid character, not
Browse files Browse the repository at this point in the history
the empty string.


git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1914302 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
minfrin committed Dec 3, 2023
1 parent db86ad8 commit 80cc967
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes for APR 1.8.0

*) apr_getopt: Fix error message. The "-" is the invalid character, not
the empty string. [Daniel Sahlberg]

*) New APR_THREAD_LOCAL and apr_thread_current*() API. [Yann Ylavic]

*) Fix a regression in apr_stat() for root path on Windows. [Ivan Zhakov]
Expand Down
2 changes: 1 addition & 1 deletion misc/unix/getopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ APR_DECLARE(apr_status_t) apr_getopt_long(apr_getopt_t *os,
}
else
if (*p == '\0') /* Bare "-" is illegal */
return serr(os, "invalid option", p, APR_BADCH);
return serr(os, "invalid option", "-", APR_BADCH);
}
}

Expand Down

0 comments on commit 80cc967

Please sign in to comment.