Skip to content

Commit

Permalink
lib/util: Delete some unused functions
Browse files Browse the repository at this point in the history
Hooray, dead code.

Closes: #1254
Approved by: jlebon
  • Loading branch information
cgwalters authored and rh-atomic-bot committed Oct 5, 2017
1 parent 2e3889a commit a903f96
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 69 deletions.
1 change: 0 additions & 1 deletion Makefile-otutil.am
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ libotutil_la_SOURCES = \
src/libotutil/ot-gio-utils.h \
src/libotutil/ot-gpg-utils.c \
src/libotutil/ot-gpg-utils.h \
src/libotutil/otutil.c \
src/libotutil/otutil.h \
src/libotutil/ot-tool-util.c \
src/libotutil/ot-tool-util.h \
Expand Down
22 changes: 0 additions & 22 deletions src/libotutil/ot-variant-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,28 +60,6 @@ ot_gvariant_new_ay_bytes (GBytes *bytes)
TRUE, (GDestroyNotify)g_bytes_unref, bytes);
}

/* Convert a GVariant of type a{sv} to a GHashTable */
GHashTable *
ot_util_variant_asv_to_hash_table (GVariant *variant)
{

GHashTable *ret = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify)g_variant_unref);
g_autoptr(GVariantIter) viter = g_variant_iter_new (variant);

char *key;
GVariant *value;
while (g_variant_iter_next (viter, "{s@v}", &key, &value))
g_hash_table_replace (ret, key, g_variant_ref_sink (value));

return ret;
}

GVariant *
ot_util_variant_take_ref (GVariant *variant)
{
return g_variant_take_ref (variant);
}

/* Create a GVariant in @out_variant that is backed by
* the data from @fd, starting at @start. If the data is
* large enough, mmap() may be used. @trusted is used
Expand Down
4 changes: 0 additions & 4 deletions src/libotutil/ot-variant-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ GVariant *ot_gvariant_new_ay_bytes (GBytes *bytes);

GVariant *ot_gvariant_new_empty_string_dict (void);

GHashTable *ot_util_variant_asv_to_hash_table (GVariant *variant);

GVariant * ot_util_variant_take_ref (GVariant *variant);

gboolean ot_variant_read_fd (int fd,
goffset offset,
const GVariantType *type,
Expand Down
40 changes: 0 additions & 40 deletions src/libotutil/otutil.c

This file was deleted.

2 changes: 0 additions & 2 deletions src/libotutil/otutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,3 @@
#include <ot-checksum-utils.h>
#include <ot-gpg-utils.h>
#include <ot-checksum-instream.h>

void ot_ptrarray_add_many (GPtrArray *a, ...) G_GNUC_NULL_TERMINATED;

0 comments on commit a903f96

Please sign in to comment.