]> Git Repo - qemu.git/blobdiff - block/nbd.c
block/qcow2: improve error message in qcow2_inactivate
[qemu.git] / block / nbd.c
index b198ad775fb903868e60a24a8535b3f610a4dbb0..e87699fb73b13646e0bebcc4ee0ea5431d5c215d 100644 (file)
@@ -109,7 +109,7 @@ static int nbd_parse_uri(const char *filename, QDict *options)
         /* strip braces from literal IPv6 address */
         if (uri->server[0] == '[') {
             host = qstring_from_substr(uri->server, 1,
-                                       strlen(uri->server) - 2);
+                                       strlen(uri->server) - 1);
         } else {
             host = qstring_from_str(uri->server);
         }
This page took 0.021039 seconds and 4 git commands to generate.