uri: Fix indention
authorSebastian Dröge <sebastian@centricular.com>
Thu, 22 Jan 2015 21:10:06 +0000 (23:10 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 22 Jan 2015 21:10:06 +0000 (23:10 +0200)
gst/gsturi.c
tests/check/gst/gsturi.c

index 37726a3..6346ea0 100644 (file)
@@ -1530,7 +1530,8 @@ gst_uri_from_string (const gchar * uri)
     int i = 0;
 
     /* be helpful and skip initial white space */
-    while (*uri == '\v' || g_ascii_isspace (*uri)) uri++;
+    while (*uri == '\v' || g_ascii_isspace (*uri))
+      uri++;
 
     if (g_ascii_isalpha (uri[i])) {
       /* find end of scheme name */
@@ -1562,8 +1563,8 @@ gst_uri_from_string (const gchar * uri)
         eoh = strchr (uri, ']');
         if (eoh == NULL || eoh > eoa) {
           GST_DEBUG ("Unable to parse the host part of the URI '%s'.",
-                  orig_uri);
-         _gst_uri_free (uri_obj);
+              orig_uri);
+          _gst_uri_free (uri_obj);
           return NULL;
         }
         reoh = eoh + 1;
@@ -1582,7 +1583,7 @@ gst_uri_from_string (const gchar * uri)
         /* if port number is malformed then we can't parse this */
         if (uri[0] != ':' || strspn (uri + 1, "0123456789") != eoa - uri - 1) {
           GST_DEBUG ("Unable to parse host/port part of the URI '%s'.",
-                  orig_uri);
+              orig_uri);
           _gst_uri_free (uri_obj);
           return NULL;
         }
index e8d50c2..3d80098 100644 (file)
@@ -371,15 +371,16 @@ GST_END_TEST;
 
 static const struct URITest url_presenting_tests[] = {
   /* check all URI elements present */
-  { .uri = { "scheme", "user:pass", "host", 1234, "/path/to/dir",
-            {{"query", NULL}, {"key", "value"}}, "fragment"},
-    .str = "scheme://user:pass@host:1234/path/to/dir?query&key=value#fragment"
-  },
+  {.uri = {"scheme", "user:pass", "host", 1234, "/path/to/dir",
+          {{"query", NULL}, {"key", "value"}}, "fragment"},
+      .str =
+      "scheme://user:pass@host:1234/path/to/dir?query&key=value#fragment"},
 
   /* IPv6 literal should render in square brackets */
-  { .uri = { "scheme", "user:pass", "12:34:56:78:9a:bc:de:f0", 1234,
-            "/path/to/dir", {{"query", "value"}}, "fragment"},
-    .str = "scheme://user:pass@[12:34:56:78:9a:bc:de:f0]:1234/path/to/dir?query=value#fragment" },
+  {.uri = {"scheme", "user:pass", "12:34:56:78:9a:bc:de:f0", 1234,
+          "/path/to/dir", {{"query", "value"}}, "fragment"},
+      .str =
+      "scheme://user:pass@[12:34:56:78:9a:bc:de:f0]:1234/path/to/dir?query=value#fragment"},
 };
 
 GST_START_TEST (test_url_presenting)
@@ -390,11 +391,11 @@ GST_START_TEST (test_url_presenting)
 
   for (i = 0; i < G_N_ELEMENTS (url_presenting_tests); i++) {
     uri = gst_uri_new (url_presenting_tests[i].uri.scheme,
-            url_presenting_tests[i].uri.userinfo,
-            url_presenting_tests[i].uri.host,
-            url_presenting_tests[i].uri.port,
-            url_presenting_tests[i].uri.path,
-            NULL, url_presenting_tests[i].uri.fragment);
+        url_presenting_tests[i].uri.userinfo,
+        url_presenting_tests[i].uri.host,
+        url_presenting_tests[i].uri.port,
+        url_presenting_tests[i].uri.path,
+        NULL, url_presenting_tests[i].uri.fragment);
     fail_unless (uri != NULL);
     for (j = 0; j < 10; j++) {
       if (!url_presenting_tests[i].uri.query[j].key)