]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl_get_line: drop single-use macro
authorViktor Szakats <commit@vsz.me>
Sun, 8 Feb 2026 00:04:20 +0000 (01:04 +0100)
committerViktor Szakats <commit@vsz.me>
Sun, 8 Feb 2026 14:47:47 +0000 (15:47 +0100)
Follow-up to 769ccb4d4261a75c8a4236fbe7dc3e27956db1c9 #19140

Closes #20542

lib/curl_get_line.c

index 0eae0029f946cd2ed998f6755554cdecc91c9940..85b3525be7b8aec63b3785af020fb5486d5b041c 100644 (file)
@@ -28,8 +28,6 @@
 
 #include "curl_get_line.h"
 
-#define appendnl(b) curlx_dyn_addn(buf, "\n", 1)
-
 /*
  * Curl_get_line() returns only complete whole lines that end with newline.
  * When 'eof' is set TRUE, the last line has been read.
@@ -60,7 +58,7 @@ CURLcode Curl_get_line(struct dynbuf *buf, FILE *input, bool *eof)
       return CURLE_OK; /* all good */
     if(*eof)
       /* append a newline */
-      return appendnl(buf);
+      return curlx_dyn_addn(buf, "\n", 1);
     /* otherwise get next line to append */
   }
   /* UNREACHABLE */