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 664EE21CAD998 for ; Fri, 30 Nov 2018 14:45:47 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id 125so460998wmh.0 for ; Fri, 30 Nov 2018 14:45:47 -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=IwxSJ7/hod9iyIsWB+JQOfXbHLHjyVfIZrsrzBqXkQ0=; b=Cg34hb8Ak7n7E5K9+nXsSVD45BVxdFXEjmQxxZREQOb1ny/N2r7o5fBNPCk0hsdIbh zvs8GBfVlZtFIbpQYEze2yOkRkrwEXbYzGUlDWmll5rziYooVGQGBjrmy9CK+B5LZUjb ZObja3ILebzVUyFx8BZQ1B5aVxpJZ2dF214xA= 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=IwxSJ7/hod9iyIsWB+JQOfXbHLHjyVfIZrsrzBqXkQ0=; b=qqv79G17QbeELLH46xhqTYKGAlhjIl4eRrMcpYSmhPklcHy0rtQvSYseN+JZo9OxaF 2K+N//AGj1WxFBKTPhqH63JFd4qWrW+gC/vmhVDhLer0UHL5wKNfmoSVfXtbbotopfAA l8A+del5LpBc5r/2F4HBhznWord3+CYeV80nZ/4kFPY0nQJwyj+d/YYMA7x7gpNkwWaF kL1JW7APM8bz4VvZYOzEmejKsqwSawit7rf95eIhOsF1LpIFuk+SCB+INn0Y+okmPUMm /4dbbWENsfUN/m6Q/1o5Wmf5DyA5e5Yrc82YQjOK8cTg4j9eoED3ZbmDX+T93VKS9j1I 8PlA== X-Gm-Message-State: AA+aEWamRB7vSGeg4JyCWWdwkj1t4XrtfKFdxOo5IS4T2KC0cm702yO1 KB0FjiA92S8rzbYIdfeRO68Vv0kMouU= X-Google-Smtp-Source: AFSGD/V41ZgHBH4+XEycOHnZcnZrSHQdK3Ri3OgpfS8ric7Oq1uXE8G6AhZx1v56V8E0iwA7CxhO3Q== X-Received: by 2002:a1c:410b:: with SMTP id o11mr488815wma.109.1543617945709; Fri, 30 Nov 2018 14:45:45 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:d895:e032:7b00:86cd]) by smtp.gmail.com with ESMTPSA id m6sm10561195wrv.24.2018.11.30.14.45.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Nov 2018 14:45:44 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Cc: Ard Biesheuvel , Laszlo Ersek , Yonghong Zhu , Liming Gao , Bob Feng , Jaben Carsey Date: Fri, 30 Nov 2018 23:45:34 +0100 Message-Id: <20181130224537.18936-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181130224537.18936-1-ard.biesheuvel@linaro.org> References: <20181130224537.18936-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [PATCH v2 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: Fri, 30 Nov 2018 22:45:47 -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 Reviewed-by: Jaben Carsey --- 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