diff --git a/Makefile-otutil.am b/Makefile-otutil.am index ff7533e965..c4c0338dad 100644 --- a/Makefile-otutil.am +++ b/Makefile-otutil.am @@ -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 \ diff --git a/src/libotutil/ot-variant-utils.c b/src/libotutil/ot-variant-utils.c index 1429a3a774..afb80be107 100644 --- a/src/libotutil/ot-variant-utils.c +++ b/src/libotutil/ot-variant-utils.c @@ -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 diff --git a/src/libotutil/ot-variant-utils.h b/src/libotutil/ot-variant-utils.h index 379e19ac30..e69104704a 100644 --- a/src/libotutil/ot-variant-utils.h +++ b/src/libotutil/ot-variant-utils.h @@ -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, diff --git a/src/libotutil/otutil.c b/src/libotutil/otutil.c deleted file mode 100644 index 26aed9b013..0000000000 --- a/src/libotutil/otutil.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2011 Colin Walters - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - * Author: Colin Walters - */ - -#include "config.h" - -#include "otutil.h" - -#include - -void -ot_ptrarray_add_many (GPtrArray *a, ...) -{ - va_list args; - void *p; - - va_start (args, a); - - while ((p = va_arg (args, void *)) != NULL) - g_ptr_array_add (a, p); - - va_end (args); -} diff --git a/src/libotutil/otutil.h b/src/libotutil/otutil.h index d6fc603ddf..80acb4751c 100644 --- a/src/libotutil/otutil.h +++ b/src/libotutil/otutil.h @@ -51,5 +51,3 @@ #include #include #include - -void ot_ptrarray_add_many (GPtrArray *a, ...) G_GNUC_NULL_TERMINATED;