This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 8025fca48c2deffe391ca914a92b8bf9a06352ce Author: Marco Casaroli <[email protected]> AuthorDate: Wed Nov 11 14:53:27 2026 +0100 netutils/thttpd: Use the result of the referer check. With CONFIG_THTTPD_URLPATTERN, check_referer() put the result of really_check_referer() in a variable that it did not use, and then tested and returned the variable r, which it did not set. The result of the check was random. The compiler also stops a -Werror build with "variable 'child' set but not used". Put the result in r. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- netutils/thttpd/libhttpd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/netutils/thttpd/libhttpd.c b/netutils/thttpd/libhttpd.c index 138b36998..ecd2a90d0 100644 --- a/netutils/thttpd/libhttpd.c +++ b/netutils/thttpd/libhttpd.c @@ -1967,9 +1967,8 @@ static int check_referer(httpd_conn *hc) #ifdef CONFIG_THTTPD_URLPATTERN char *cp; int r; - int child; - child = really_check_referer(hc); + r = really_check_referer(hc); if (!r) {
