From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::341; helo=mail-wm1-x341.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B36BD21BADAB9 for ; Thu, 29 Nov 2018 04:31:39 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id y1so2066747wmi.3 for ; Thu, 29 Nov 2018 04:31:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=c4vWTRxQlB5zBWAMIVBgKE8txScPd41TLF7KfR0J2Qc=; b=ZSmMipF03jZjNf0w335VaYej3wqAdi5PjoEqv72FPoezAqJ3Dx8crFB+cKXTyajD+P YQyTFhONvHazn8zM+ZUuyHJywJlR3OhWPpQTynJ94sfMOXkMUI/ACfAF8znXg5Tzovkf 7Gun9C2v6uSOhfMVpH+NQ+ijAenjJSRXnnqSg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c4vWTRxQlB5zBWAMIVBgKE8txScPd41TLF7KfR0J2Qc=; b=fvsjKzNgkOGaY6ma5n7nXsi7cvvjW7pWepV1/zjnvxCXUM7EV2qzzMHZ0OMbEU90qL C5oot4aDEK9G8y5QWp/B5OX1pNphN0/6GqMFowxplp0ejaY7u+hJ93D0o6vMc8hhgPGX TkwMLtfdxVFEelVsIVyXEpbHQ3+Yz3q1pL18LOEGYsp/jEKR0CZyz7p2yA0r3H5E9FbB BQHwuuFcj5aP/7y5/WcVjflEKcYQaPAfpGWmnJt8/I9/yvtJiKazay3NzZyXUToHrV/Q s39xljeI78OFHYAKJXNHoI6xEEYkrvFuY1w4/M3PAF2hZvYvRTJiyowIBcR9Gy77FUBb sH0g== X-Gm-Message-State: AA+aEWYT1mujgCEkAjGkV6K38kgIHjS1qz7LCOdP4uQxDaXkxg0ZKIrP Tb+1773GdU+y9RuFcffy8SzQZBvv/Qk= X-Google-Smtp-Source: AFSGD/XiugokITHoSZgmAi0I9pmdUquAxiSDgH7f+9WYX6dta3hOG/vhmjodnDR4WcoIkno6uYf0mw== X-Received: by 2002:a1c:9183:: with SMTP id t125mr1521404wmd.79.1543494697943; Thu, 29 Nov 2018 04:31:37 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:3580:6f80:40a7:5bdd]) by smtp.gmail.com with ESMTPSA id c7sm3089525wre.64.2018.11.29.04.31.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 04:31:37 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Cc: Ard Biesheuvel , Laszlo Ersek , Yonghong Zhu , Liming Gao , Bob Feng Date: Thu, 29 Nov 2018 13:31:26 +0100 Message-Id: <20181129123129.25095-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181129123129.25095-1-ard.biesheuvel@linaro.org> References: <20181129123129.25095-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [PATCH 3/6] BaseTools/DevicePath: use explicit 64-bit number parsing routines X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 12:31:40 -0000 Content-Transfer-Encoding: 8bit Replace invocations of StrHexToUintn() with StrHexToUint64(), so that we can drop the former. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- BaseTools/Source/C/DevicePath/DevicePathFromText.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/C/DevicePath/DevicePathFromText.c b/BaseTools/Source/C/DevicePath/DevicePathFromText.c index 555efa1acdde..6151926af9aa 100644 --- a/BaseTools/Source/C/DevicePath/DevicePathFromText.c +++ b/BaseTools/Source/C/DevicePath/DevicePathFromText.c @@ -520,7 +520,7 @@ EisaIdFromText ( return (((Text[0] - 'A' + 1) & 0x1f) << 10) + (((Text[1] - 'A' + 1) & 0x1f) << 5) + (((Text[2] - 'A' + 1) & 0x1f) << 0) - + (UINT32) (StrHexToUintn (&Text[3]) << 16) + + (UINT32) (StrHexToUint64 (&Text[3]) << 16) ; } @@ -1506,7 +1506,7 @@ DevPathFromTextNVMe ( Index = sizeof (Nvme->NamespaceUuid) / sizeof (UINT8); while (Index-- != 0) { - Uuid[Index] = (UINT8) StrHexToUintn (SplitStr (&NamespaceUuidStr, L'-')); + Uuid[Index] = (UINT8) StrHexToUint64 (SplitStr (&NamespaceUuidStr, L'-')); } return (EFI_DEVICE_PATH_PROTOCOL *) Nvme; -- 2.19.1