]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
selinux-util: make type of cleanup func void 33352/head
authorMike Yuan <me@yhndnzj.com>
Sat, 15 Jun 2024 10:55:45 +0000 (12:55 +0200)
committerMike Yuan <me@yhndnzj.com>
Sat, 15 Jun 2024 11:05:50 +0000 (13:05 +0200)
Follow-up for 6623c64a02fae52103cdc9c80dfcabec9eeaf8ba

Return values are pointless for _cleanup_ functions, and
this matches what we do in DEFINE_TRIVIAL_CLEANUP_FUNC().

src/shared/selinux-util.h

index 038456fcca6574d79c33cbe3aca509bb6089da97..3a2cf0d85070f42177016d3832aa2dec71c9d6fe 100644 (file)
@@ -14,9 +14,8 @@
 
 DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(char*, freecon, NULL);
 #else
-static inline char* freeconp(char **p) {
+static inline void freeconp(char **p) {
         assert(*p == NULL);
-        return NULL;
 }
 #endif