aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-02-27 20:57:33 +0100
committerChristian Grothoff <christian@grothoff.org>2021-02-27 20:57:33 +0100
commit6b3d0c27b79ef0622ce1b0147bdaeabee97ff59e (patch)
treeb0bea0ebefd3c1947cbcad8a4a5ca20ff4263a50
parentb55c4031d49904148139660dea231f37f2afc878 (diff)
downloadlibmicrohttpd-6b3d0c27b79ef0622ce1b0147bdaeabee97ff59e.tar.gz
libmicrohttpd-6b3d0c27b79ef0622ce1b0147bdaeabee97ff59e.zip
simplify
-rw-r--r--src/microhttpd/digestauth.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
index 3ab1ec13..5fc9c588 100644
--- a/src/microhttpd/digestauth.c
+++ b/src/microhttpd/digestauth.c
@@ -629,7 +629,6 @@ check_nonce_nc (struct MHD_Connection *connection,
629char * 629char *
630MHD_digest_auth_get_username (struct MHD_Connection *connection) 630MHD_digest_auth_get_username (struct MHD_Connection *connection)
631{ 631{
632 size_t len;
633 char user[MAX_USERNAME_LENGTH]; 632 char user[MAX_USERNAME_LENGTH];
634 const char *header; 633 const char *header;
635 634
@@ -646,10 +645,10 @@ MHD_digest_auth_get_username (struct MHD_Connection *connection)
646 MHD_STATICSTR_LEN_ (_BASE))) 645 MHD_STATICSTR_LEN_ (_BASE)))
647 return NULL; 646 return NULL;
648 header += MHD_STATICSTR_LEN_ (_BASE); 647 header += MHD_STATICSTR_LEN_ (_BASE);
649 if (0 == (len = lookup_sub_value (user, 648 if (0 == lookup_sub_value (user,
650 sizeof (user), 649 sizeof (user),
651 header, 650 header,
652 "username"))) 651 "username"))
653 return NULL; 652 return NULL;
654 return strdup (user); 653 return strdup (user);
655} 654}