From 5b326e74cd23d2965ccfc5ade3f6325e7e3c9e1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Wed, 7 Aug 2019 18:33:53 +0200 Subject: [PATCH] [FREELDR] Don't call twice strlen() implicitly (in the min() macro). --- boot/freeldr/freeldr/linuxboot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/boot/freeldr/freeldr/linuxboot.c b/boot/freeldr/freeldr/linuxboot.c index 6ddc8b99c30..b1378df2fc0 100644 --- a/boot/freeldr/freeldr/linuxboot.c +++ b/boot/freeldr/freeldr/linuxboot.c @@ -248,7 +248,8 @@ LinuxParseIniSection( if (LinuxCommandLine) { RemoveQuotes(LinuxCommandLine); - LinuxCommandLineSize = min(strlen(LinuxCommandLine) + 1, 260); + LinuxCommandLineSize = (ULONG)strlen(LinuxCommandLine) + 1; + LinuxCommandLineSize = min(LinuxCommandLineSize, 260); } return TRUE;