]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
curl-util: Fix clang-tidy warnings (#42030)
authorDaan De Meyer <daan@amutable.com>
Mon, 11 May 2026 17:17:53 +0000 (19:17 +0200)
committerGitHub <noreply@github.com>
Mon, 11 May 2026 17:17:53 +0000 (18:17 +0100)
Use the ref/unref macros to make sure the parameter names match

Follow-up for 87cec65cae656f6ac2e702bd60dad6dd4fdae636

src/shared/curl-util.h

index 3436188952fbce5093b5011d18aaaf6c1fcdd9a6..c35de1cb7b2549fca304bd15e61ac4231ca31bd2 100644 (file)
@@ -33,9 +33,7 @@ extern DLSYM_PROTOTYPE(curl_slist_free_all);
 typedef int (*curl_finished_t)(CurlSlot *slot, CURL *curl, CURLcode code, void *userdata);
 
 int curl_glue_new(CurlGlue **glue, sd_event *event);
-CurlGlue* curl_glue_ref(CurlGlue *glue);
-CurlGlue* curl_glue_unref(CurlGlue *glue);
-
+DECLARE_TRIVIAL_REF_UNREF_FUNC(CurlGlue, curl_glue);
 DEFINE_TRIVIAL_CLEANUP_FUNC(CurlGlue*, curl_glue_unref);
 
 /* Build a CURL easy handle with sane defaults. The caller configures any
@@ -62,9 +60,7 @@ int curl_glue_perform_async(
 CURL* curl_slot_get_easy(CurlSlot *slot);
 CurlGlue* curl_slot_get_glue(CurlSlot *slot);
 
-CurlSlot* curl_slot_ref(CurlSlot *slot);
-CurlSlot* curl_slot_unref(CurlSlot *slot);
-
+DECLARE_TRIVIAL_REF_UNREF_FUNC(CurlSlot, curl_slot);
 DEFINE_TRIVIAL_CLEANUP_FUNC(CurlSlot*, curl_slot_unref);
 
 struct curl_slist *curl_slist_new(const char *first, ...) _sentinel_;