summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2014-06-30 09:40:19 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-07-01 10:15:26 +0200
commit931c1dcec043e6baac718a94f8731cc31461d4db (patch)
tree5a7df8a3924f3feec91121c2f98988c84d52faf1 /src/include
parentf41cb4ecd23c951e1c1c4fef0c99772983a3eba4 (diff)
downloadcoreboot-931c1dcec043e6baac718a94f8731cc31461d4db.tar.xz
stdlib: Drop duplicates of min() and max()
Change-Id: Ib2f6fad735e085d237a0d46e0586e123eef6e0e2 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/6161 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/spi_flash.h2
-rw-r--r--src/include/stdlib.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/include/spi_flash.h b/src/include/spi_flash.h
index fe48d3b757..8e514719a1 100644
--- a/src/include/spi_flash.h
+++ b/src/include/spi_flash.h
@@ -39,8 +39,6 @@
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
-#define min(a, b) ((a)<(b)?(a):(b))
-
#define CONFIG_ICH_SPI
#ifdef CONFIG_ICH_SPI
#define CONTROLLER_PAGE_LIMIT 64
diff --git a/src/include/stdlib.h b/src/include/stdlib.h
index cb5a6ca703..44d7c0126b 100644
--- a/src/include/stdlib.h
+++ b/src/include/stdlib.h
@@ -13,6 +13,9 @@
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define MAX(a,b) ((a) > (b) ? (a) : (b))
+#define min(a,b) MIN((a),(b))
+#define max(a,b) MAX((a),(b))
+
#if !defined(__PRE_RAM__)
void *memalign(size_t boundary, size_t size);
void *malloc(size_t size);