diff options
author | Alexander Larsson <alexl@redhat.com> | 2016-05-06 16:03:27 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2016-05-06 16:03:27 +0200 |
commit | 1ffdf27d927c7944e3bce9b1cd3c101d823fd826 (patch) | |
tree | b91268da5ea5f1d224977ce4e5bbb75386d9a424 /builder/builder-source-patch.c | |
parent | afa12a446fcc473eb740146805856e76ad82b4af (diff) | |
download | xdg-app-1ffdf27d927c7944e3bce9b1cd3c101d823fd826.tar.gz |
uncruftify: Initial run, all non-problematic changes
Diffstat (limited to 'builder/builder-source-patch.c')
-rw-r--r-- | builder/builder-source-patch.c | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/builder/builder-source-patch.c b/builder/builder-source-patch.c index f4dd6da..0e49e40 100644 --- a/builder/builder-source-patch.c +++ b/builder/builder-source-patch.c @@ -32,14 +32,16 @@ #include "builder-utils.h" #include "builder-source-patch.h" -struct BuilderSourcePatch { +struct BuilderSourcePatch +{ BuilderSource parent; - char *path; - guint strip_components; + char *path; + guint strip_components; }; -typedef struct { +typedef struct +{ BuilderSourceClass parent_class; } BuilderSourcePatchClass; @@ -55,7 +57,7 @@ enum { static void builder_source_patch_finalize (GObject *object) { - BuilderSourcePatch *self = (BuilderSourcePatch *)object; + BuilderSourcePatch *self = (BuilderSourcePatch *) object; g_free (self->path); @@ -111,8 +113,8 @@ builder_source_patch_set_property (GObject *object, static GFile * get_source_file (BuilderSourcePatch *self, - BuilderContext *context, - GError **error) + BuilderContext *context, + GError **error) { if (self->path == NULL || self->path[0] == 0) { @@ -124,12 +126,13 @@ get_source_file (BuilderSourcePatch *self, } static gboolean -builder_source_patch_download (BuilderSource *source, - gboolean update_vcs, +builder_source_patch_download (BuilderSource *source, + gboolean update_vcs, BuilderContext *context, - GError **error) + GError **error) { BuilderSourcePatch *self = BUILDER_SOURCE_PATCH (source); + g_autoptr(GFile) src = NULL; src = get_source_file (self, context, error); @@ -146,9 +149,9 @@ builder_source_patch_download (BuilderSource *source, } static gboolean -patch (GFile *dir, +patch (GFile *dir, GError **error, - ...) + ...) { gboolean res; va_list ap; @@ -161,12 +164,13 @@ patch (GFile *dir, } static gboolean -builder_source_patch_extract (BuilderSource *source, - GFile *dest, +builder_source_patch_extract (BuilderSource *source, + GFile *dest, BuilderContext *context, - GError **error) + GError **error) { BuilderSourcePatch *self = BUILDER_SOURCE_PATCH (source); + g_autoptr(GFile) patchfile = NULL; g_autofree char *patch_path = NULL; g_autofree char *strip_components = NULL; @@ -189,6 +193,7 @@ builder_source_patch_checksum (BuilderSource *source, BuilderContext *context) { BuilderSourcePatch *self = BUILDER_SOURCE_PATCH (source); + g_autoptr(GFile) src = NULL; g_autofree char *data = NULL; gsize len; @@ -198,7 +203,7 @@ builder_source_patch_checksum (BuilderSource *source, return; if (g_file_load_contents (src, NULL, &data, &len, NULL, NULL)) - builder_cache_checksum_data (cache, (guchar *)data, len); + builder_cache_checksum_data (cache, (guchar *) data, len); builder_cache_checksum_str (cache, self->path); builder_cache_checksum_uint32 (cache, self->strip_components); |