summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Levon <john.levon@joyent.com>2020-05-18 07:04:24 +0100
committerGitHub <noreply@github.com>2020-05-18 09:04:24 +0300
commit2a17967159b3fb751d8956fc647b67177089a1ff (patch)
treedc6d68d8611c54bb4a2061eacd504d504ef6803c
parentc3939dac2c060651361fc71516806f9ab8c38901 (diff)
downloadipmitool-2a17967159b3fb751d8956fc647b67177089a1ff.tar.gz
hpm: use portable __max() in hpmfwupg
Instead of non-portable MAX() use __max() in hpmfwupg
-rw-r--r--lib/ipmi_hpmfwupg.c5
1 files 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;