From 80cc9675f1239083bc4791be294685a99795dab5 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Sun, 3 Dec 2023 13:34:57 +0000 Subject: [PATCH] apr_getopt: Fix error message. The "-" is the invalid character, not the empty string. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1914302 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ misc/unix/getopt.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 71938f5e047..dd9de6c2aa4 100644 --- a/CHANGES +++ b/CHANGES @@ -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] diff --git a/misc/unix/getopt.c b/misc/unix/getopt.c index 24be3c82f89..1509d4856b9 100644 --- a/misc/unix/getopt.c +++ b/misc/unix/getopt.c @@ -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); } }