]> Git Repo - qemu.git/blobdiff - util/uri.c
vl: relocate paths to data directories
[qemu.git] / util / uri.c
index 93ecefdaaf7d5af45b4d681755adb9e4c5be7e35..8bdef841208d249cb1a24116811b38d9480daa32 100644 (file)
@@ -52,6 +52,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/cutils.h"
 
 #include "qemu/uri.h"
 
@@ -1065,10 +1066,7 @@ URI *uri_parse_raw(const char *str, int raw)
  */
 URI *uri_new(void)
 {
-    URI *ret;
-
-    ret = g_new0(URI, 1);
-    return ret;
+    return g_new0(URI, 1);
 }
 
 /**
@@ -2269,10 +2267,7 @@ struct QueryParams *query_params_parse(const char *query)
         /* Find the next separator, or end of the string. */
         end = strchr(query, '&');
         if (!end) {
-            end = strchr(query, ';');
-        }
-        if (!end) {
-            end = query + strlen(query);
+            end = qemu_strchrnul(query, ';');
         }
 
         /* Find the first '=' character between here and end. */
This page took 0.032899 seconds and 4 git commands to generate.