From nobody Sun May 5 14:38:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1496368593605563.4026243437557; Thu, 1 Jun 2017 18:56:33 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F3ABD8047B; Fri, 2 Jun 2017 01:56:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ECB787DB4B; Fri, 2 Jun 2017 01:56:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id F298C4BB7F; Fri, 2 Jun 2017 01:56:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v521uOl3030916 for ; Thu, 1 Jun 2017 21:56:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 47416956D6; Fri, 2 Jun 2017 01:56:24 +0000 (UTC) Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3F4B395347 for ; Fri, 2 Jun 2017 01:56:22 +0000 (UTC) Received: from mail-qk0-f193.google.com (mail-qk0-f193.google.com [209.85.220.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 36E8AC0587C2 for ; Fri, 2 Jun 2017 01:56:21 +0000 (UTC) Received: by mail-qk0-f193.google.com with SMTP id y201so3622559qka.3 for ; Thu, 01 Jun 2017 18:56:21 -0700 (PDT) Received: from localhost.localdomain ([186.223.3.196]) by smtp.googlemail.com with ESMTPSA id h21sm11623545qke.52.2017.06.01.18.56.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Jun 2017 18:56:19 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F3ABD8047B Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com F3ABD8047B Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uVcNJKfc" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 36E8AC0587C2 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jcfaracco@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 36E8AC0587C2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=vJHO24PjpQurLUwnSgqpLHmj+R5WZQYQ2emmIec6eDI=; b=uVcNJKfcb8/LN6Xeg3PCRhiu/KNNVF3mzEdS6IIMJgvqW2RG1UDnwQ4veAfPpOK512 fHo2SAiZWIei9yBkn85RhmBlIyXiOLxW7z+5WOn69bJXEWLwspjXX6t9aKcUMjPEVpA5 t239XJcw2ghP3PiTqcswRjLLLbwR3pHnRPiN7PU4PDGBgcOMZ0IPMaQHaVCVEPb/jGAF N2upXDansbPTQnYNDtoj1KsF44S05yFZCXyFKCWZBLempr15trFppkXSZBKKxkv+b9B3 5xaeh/2soJd2vhlgaKTCQbj1WQBNbs0weDdkTtEdz8R8W/ND1f6IC0K4mF/gD0diOZRv xOlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=vJHO24PjpQurLUwnSgqpLHmj+R5WZQYQ2emmIec6eDI=; b=FVaHMxF6id6U4fPugUGcgckcaho7RbbbzuoXFFD/vW9OAe6kk5CepYQ7ZcwyoZW9qe h2wp00Ik86xFQjyF7kZKruRfN7mT+k6X1OO0IN6ElHCAm8Q5fXJXUa6GUaBRocc4KvKl jJibPZ/Wf5jEM55qQPoIKkmMWCYU2zLzc3W0uUmsBxDTGygm5HMLPa/UcDJ0epzUh6HS WMgQ7cr+wfXj2YN50ExpLdT8dphuQujpCwV3/90Fnvnl06Rd1aAvcPB/OrmMcKAKPaou wuYBLS2FzI0L2FXeye5q9NpEBG3QqZnaoMa6DfminyT/4JKpDLU8kLTb7iVj0LgTF4IP xJ4Q== X-Gm-Message-State: AODbwcBjt2DGFPUCEAlcP0HKcc4VvG+chxNp2nECPSMY1u06fgfM0zJB U3goJt1YuDgyJe9V X-Received: by 10.55.168.86 with SMTP id r83mr5827988qke.97.1496368580333; Thu, 01 Jun 2017 18:56:20 -0700 (PDT) From: Julio Faracco To: libvir-list@redhat.com Date: Thu, 1 Jun 2017 22:56:09 -0300 Message-Id: <1496368569-14937-1-git-send-email-jcfaracco@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 02 Jun 2017 01:56:21 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 02 Jun 2017 01:56:21 +0000 (UTC) for IP:'209.85.220.193' DOMAIN:'mail-qk0-f193.google.com' HELO:'mail-qk0-f193.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.17 * (BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_SPAM, SPF_PASS) 209.85.220.193 mail-qk0-f193.google.com 209.85.220.193 mail-qk0-f193.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] util: removing dead code inside virstoragefile. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 02 Jun 2017 01:56:31 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The host address or the socket path have already been checked at the begini= ng=20 of the function virStorageSourceParseNBDColonString(). So, when the paramet= er=20 is not a unix socket, there is no reason to check the address again because=20 if it does not exists, the logic will fail in the first IF conditional. Signed-off-by: Julio Faracco --- src/util/virstoragefile.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index b43acf6..6d8ada9 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -2635,13 +2635,6 @@ virStorageSourceParseNBDColonString(const char *nbds= tr, goto cleanup; =20 } else { - if (!backing[1]) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("missing host name in nbd string '%s'"), - nbdstr); - goto cleanup; - } - if (VIR_STRDUP(src->hosts->name, backing[1]) < 0) goto cleanup; =20 --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list