[ostree] remote: Minor argument parsing cleanup
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] remote: Minor argument parsing cleanup
- Date: Sat, 21 Jun 2014 19:58:01 +0000 (UTC)
commit 6eac1085601db797661ca18e05f9235c3f742de7
Author: Colin Walters <walters verbum org>
Date: Sat Jun 21 12:11:56 2014 -0400
remote: Minor argument parsing cleanup
Only access relevant portion of argv after we've verified argc.
https://bugzilla.gnome.org/show_bug.cgi?id=731984
src/ostree/ot-builtin-remote.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/ostree/ot-builtin-remote.c b/src/ostree/ot-builtin-remote.c
index 75abc55..3a9c3b7 100644
--- a/src/ostree/ot-builtin-remote.c
+++ b/src/ostree/ot-builtin-remote.c
@@ -98,7 +98,7 @@ ostree_builtin_remote (int argc, char **argv, OstreeRepo *repo, GCancellable *ca
if (!strcmp (op, "add"))
{
- const char *url = argv[3];
+ const char *url;
char **iter;
gs_free char *target_name = NULL;
gs_unref_object GFile *target_conf = NULL;
@@ -110,6 +110,8 @@ ostree_builtin_remote (int argc, char **argv, OstreeRepo *repo, GCancellable *ca
goto out;
}
+ url = argv[3];
+
optbuilder = g_variant_builder_new (G_VARIANT_TYPE ("a{sv}"));
if (argc > 4)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]