summaryrefslogtreecommitdiff
path: root/src/process_url.h
diff options
context:
space:
mode:
authorMole Shang <[email protected]>2024-03-02 12:55:03 +0800
committerMole Shang <[email protected]>2024-03-02 12:55:03 +0800
commit74ebee5d3a81a39766ba8cd436a548449ea887b0 (patch)
tree69c238d2bff0d69aa4778d22e21de8d519b00dff /src/process_url.h
parent62c193bd4e464ec9d847b8abff21e10dfc7b511e (diff)
downloadhinata-74ebee5d3a81a39766ba8cd436a548449ea887b0.tar.gz
hinata-74ebee5d3a81a39766ba8cd436a548449ea887b0.tar.bz2
hinata-74ebee5d3a81a39766ba8cd436a548449ea887b0.zip
tree-wide: use FREE_AND_NULLIFY macro and reformat code
Jeez idk why i forgot the pass-by-value feature, so the original version never gets the pointer nullified. Fix it by using our favourite C-style macro.
Diffstat (limited to 'src/process_url.h')
-rw-r--r--src/process_url.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/process_url.h b/src/process_url.h
index 72a650f..76fe574 100644
--- a/src/process_url.h
+++ b/src/process_url.h
@@ -7,15 +7,12 @@
#include <stdbool.h>
#include "constants.h"
-#include "utils/utils.h"
#include "status.h"
+#include "utils/utils.h"
#define ERRTOSTRING(err) curl_easy_strerror(err)
#define logerr(X) \
- _Generic((X), CURLcode \
- : logerr_b, CURLHcode \
- : logerr_h, CURLUcode \
- : logerr_u)(X)
+ _Generic((X), CURLcode: logerr_b, CURLHcode: logerr_h, CURLUcode: logerr_u)(X)
typedef struct curl_conf {
curl_off_t dlnow_per_thrd[MAX_THREAD];