]> git.seodisparate.com - c_simple_http/commitdiff
Minor refactoring/fixes
authorStephen Seo <seo.disparate@gmail.com>
Tue, 10 Sep 2024 10:22:47 +0000 (19:22 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Tue, 10 Sep 2024 10:22:47 +0000 (19:22 +0900)
src/main.c

index 06528a24f317b22d9b6f3a62cfa0f3da7fb74574..1ee91897dc4d058f96cfc2cda91258a28c65c069 100644 (file)
@@ -55,11 +55,11 @@ int c_simple_http_headers_check_print(void *data, void *ud) {
 
   __attribute__((cleanup(simple_archiver_helper_cleanup_c_string)))
   char *header_c_str_lowercase = c_simple_http_helper_to_lowercase(
-    header_c_str, strlen(header_c_str) + 1);
+    header_c_str, strlen(header_c_str));
   char *matching_line = simple_archiver_hash_map_get(
     headers_map,
     header_c_str_lowercase,
-    strlen(header_c_str) + 1);
+    strlen(header_c_str_lowercase) + 1);
   if (matching_line) {
     printf("Printing header line: %s\n", matching_line);
   }