diff options
Diffstat (limited to 'src/libotutil/otutil.h')
-rw-r--r-- | src/libotutil/otutil.h | 60 |
1 files changed, 39 insertions, 21 deletions
diff --git a/src/libotutil/otutil.h b/src/libotutil/otutil.h index 4279bc15..27f84103 100644 --- a/src/libotutil/otutil.h +++ b/src/libotutil/otutil.h @@ -22,9 +22,9 @@ #pragma once #include <gio/gio.h> +#include <libglnx.h> #include <string.h> /* Yeah...let's just do that here. */ #include <syslog.h> -#include <libglnx.h> #ifdef HAVE_LIBSYSTEMD #include <systemd/sd-journal.h> @@ -32,9 +32,21 @@ /* https://bugzilla.gnome.org/show_bug.cgi?id=766370 */ #if !GLIB_CHECK_VERSION(2, 49, 3) -#define OT_VARIANT_BUILDER_INITIALIZER {{0,}} +#define OT_VARIANT_BUILDER_INITIALIZER \ + { \ + { \ + 0, \ + } \ + } #else -#define OT_VARIANT_BUILDER_INITIALIZER {{{0,}}} +#define OT_VARIANT_BUILDER_INITIALIZER \ + { \ + { \ + { \ + 0, \ + } \ + } \ + } #endif static inline const char * @@ -45,20 +57,27 @@ ot_booltostr (int b) #define ot_gobject_refz(o) (o ? g_object_ref (o) : o) -#define ot_transfer_out_value(outp, srcp) G_STMT_START { \ - if (outp) \ - { \ - *outp = *srcp; \ - *(srcp) = NULL; \ - } \ - } G_STMT_END; +#define ot_transfer_out_value(outp, srcp) \ + G_STMT_START \ + { \ + if (outp) \ + { \ + *outp = *srcp; \ + *(srcp) = NULL; \ + } \ + } \ + G_STMT_END; #ifdef HAVE_LIBSYSTEMD -#define ot_journal_send(...) sd_journal_send(__VA_ARGS__) -#define ot_journal_print(...) sd_journal_print(__VA_ARGS__) +#define ot_journal_send(...) sd_journal_send (__VA_ARGS__) +#define ot_journal_print(...) sd_journal_print (__VA_ARGS__) #else -#define ot_journal_send(...) {} -#define ot_journal_print(...) {} +#define ot_journal_send(...) \ + { \ + } +#define ot_journal_print(...) \ + { \ + } #endif typedef GMainContext GMainContextPopDefault; @@ -85,17 +104,16 @@ _ostree_main_context_new_default (void) G_DEFINE_AUTOPTR_CLEANUP_FUNC (GMainContextPopDefault, _ostree_main_context_pop_default_destroy) - -#include <ot-keyfile-utils.h> -#include <ot-gio-utils.h> +#include <ot-checksum-instream.h> +#include <ot-checksum-utils.h> #include <ot-fs-utils.h> +#include <ot-gio-utils.h> +#include <ot-keyfile-utils.h> #include <ot-opt-utils.h> +#include <ot-tool-util.h> #include <ot-unix-utils.h> -#include <ot-variant-utils.h> #include <ot-variant-builder.h> -#include <ot-checksum-utils.h> -#include <ot-checksum-instream.h> -#include <ot-tool-util.h> +#include <ot-variant-utils.h> #ifndef OSTREE_DISABLE_GPGME #include <ot-gpg-utils.h> |