From 2a17967159b3fb751d8956fc647b67177089a1ff Mon Sep 17 00:00:00 2001 From: John Levon Date: Mon, 18 May 2020 07:04:24 +0100 Subject: [PATCH] hpm: use portable __max() in hpmfwupg Instead of non-portable MAX() use __max() in hpmfwupg --- lib/ipmi_hpmfwupg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ipmi_hpmfwupg.c b/lib/ipmi_hpmfwupg.c index d63d2c1..884dbe8 100644 --- a/lib/ipmi_hpmfwupg.c +++ b/lib/ipmi_hpmfwupg.c @@ -1,6 +1,7 @@ /* * Copyright (c) 2006 Kontron Canada, Inc. All Rights Reserved. * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2020 Joyent, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -1991,7 +1992,7 @@ HpmfwupgQueryRollbackStatus(struct ipmi_intf *intf, rollbackTimeout = 0; } /* Use the greater of the two timeouts (header and target caps) */ - rollbackTimeout = MAX(rollbackTimeout, + rollbackTimeout = __max(rollbackTimeout, pFwupgCtx->targetCap.rollbackTimeout) * 5; } else { rollbackTimeout = HPMFWUPG_DEFAULT_UPGRADE_TIMEOUT; @@ -2066,7 +2067,7 @@ HpmfwupgQuerySelftestResult(struct ipmi_intf *intf, struct HpmfwupgQuerySelftest /* Getting selftest timeout from new image */ struct HpmfwupgImageHeader *pImageHeader = (struct HpmfwupgImageHeader*) pFwupgCtx->pImageData; - selfTestTimeout = MAX(pImageHeader->selfTestTimeout, + selfTestTimeout = __max(pImageHeader->selfTestTimeout, pFwupgCtx->targetCap.selftestTimeout) * 5; } else { selfTestTimeout = HPMFWUPG_DEFAULT_UPGRADE_TIMEOUT;