nuttx: Use MIN/MAX definitions from "sys/param.h"

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
Gustavo Henrique Nihei
2023-02-01 10:41:12 -03:00
committed by Xiang Xiao
parent 079e2b8c7c
commit e6b204f438
179 changed files with 195 additions and 1304 deletions
+1 -8
View File
@@ -50,6 +50,7 @@
#include <stddef.h>
#include <stdbool.h>
#include <sys/param.h>
#include "spiffs.h"
#include "spiffs_mtd.h"
@@ -369,14 +370,6 @@
#define SPIFFS_VIS_NO_WRAP (1<<2)
#ifndef MIN
# define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
#ifndef MAX
# define MAX(a,b) ((a) > (b) ? (a) : (b))
#endif
/****************************************************************************
* Public Types
****************************************************************************/
+2 -10
View File
@@ -32,6 +32,8 @@ extern "C"
#include <nuttx/config.h>
#include <sys/param.h>
#include <nuttx/mtd/mtd.h>
/****************************************************************************
@@ -59,16 +61,6 @@ extern "C"
# define spiffs_mtdinfo _none
#endif
/* Commonly used Macros */
#ifndef MIN
# define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
#ifndef MAX
# define MAX(a,b) ((a) > (b) ? (a) : (b))
#endif
/****************************************************************************
* Public Function Prototypes
****************************************************************************/