summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2020-07-12 23:58:21 +0200
committerDavid Härdeman <david@hardeman.nu>2020-07-12 23:58:21 +0200
commit01eb1fe238371c3a29b22f1d06147f527285539e (patch)
treecc0301f776226dc12a109066c29a3a940c831a29 /shared
parent708f431db8dab6779dd090a1117e556340eca9cc (diff)
Teach minecctl to delete servers on commandHEADmaster
Diffstat (limited to 'shared')
-rw-r--r--shared/utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/shared/utils.h b/shared/utils.h
index b6bf51c..2bf7aae 100644
--- a/shared/utils.h
+++ b/shared/utils.h
@@ -188,4 +188,10 @@ static inline void fclosep(FILE **f) {
}
#define _cleanup_fclose_ _cleanup_(fclosep)
+static inline void closedirp(DIR **d) {
+ if (d && *d)
+ closedir(*d);
+}
+#define _cleanup_closedir_ _cleanup_(closedirp)
+
#endif