mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
fs: fully parenthesize MIN and MAX macros
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
This commit is contained in:
committed by
Xiang Xiao
parent
33125e929c
commit
cd41ed9b6d
@@ -983,20 +983,6 @@ struct fat_dirinfo_s
|
|||||||
struct fs_fatdir_s dir; /* Used with opendir, readdir, etc. */
|
struct fs_fatdir_s dir; /* Used with opendir, readdir, etc. */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Generic helper macros ****************************************************/
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (a < b ? a : b)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (a > b ? a : b)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Public Data
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Function Prototypes
|
* Public Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -71,6 +71,14 @@
|
|||||||
#include "inode/inode.h"
|
#include "inode/inode.h"
|
||||||
#include "fs_fat32.h"
|
#include "fs_fat32.h"
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Pre-processor Definitions
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef MIN
|
||||||
|
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|||||||
@@ -52,16 +52,6 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Quasi-standard definitions */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (a < b ? a : b)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (a > b ? a : b)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define HOSTFS_MAX_PATH 256
|
#define HOSTFS_MAX_PATH 256
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
+2
-2
@@ -191,11 +191,11 @@
|
|||||||
/* Quasi-standard definitions */
|
/* Quasi-standard definitions */
|
||||||
|
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
# define MIN(a,b) (a < b ? a : b)
|
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MAX
|
#ifndef MAX
|
||||||
# define MAX(a,b) (a > b ? a : b)
|
# define MAX(a,b) ((a) > (b) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -51,11 +51,7 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
# define MIN(a,b) ((a < b) ? a : b)
|
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) ((a > b) ? a : b)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@@ -78,9 +74,10 @@
|
|||||||
*
|
*
|
||||||
* procfs_memcpy() is a helper function. Each read() method should
|
* procfs_memcpy() is a helper function. Each read() method should
|
||||||
* provide data in a local data buffer ('src' and 'srclen'). This
|
* provide data in a local data buffer ('src' and 'srclen'). This
|
||||||
* will transfer the data to the user receive buffer ('dest' and 'destlen'),
|
* will transfer the data to the user receive buffer ('dest' and
|
||||||
* respecting both (1) the size of the destination buffer so that it will
|
* 'destlen'), respecting both (1) the size of the destination buffer so
|
||||||
* write beyond the user receiver and (1) the file position, 'offset'.
|
* that it will write beyond the user receiver and (1) the file position,
|
||||||
|
* 'offset'.
|
||||||
*
|
*
|
||||||
* This function will skip over data until the under of bytes specified
|
* This function will skip over data until the under of bytes specified
|
||||||
* by 'offset' have been skipped. Then it will transfer data from the
|
* by 'offset' have been skipped. Then it will transfer data from the
|
||||||
|
|||||||
@@ -176,16 +176,6 @@
|
|||||||
|
|
||||||
#define SMART_MAGICSIZE 4
|
#define SMART_MAGICSIZE 4
|
||||||
|
|
||||||
/* Quasi-standard definitions */
|
|
||||||
|
|
||||||
#ifndef MIN
|
|
||||||
# define MIN(a,b) (a < b ? a : b)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MAX
|
|
||||||
# define MAX(a,b) (a > b ? a : b)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Underlying MTD Block driver access functions */
|
/* Underlying MTD Block driver access functions */
|
||||||
|
|
||||||
#define FS_BOPS(f) (f)->fs_blkdriver->u.i_bops
|
#define FS_BOPS(f) (f)->fs_blkdriver->u.i_bops
|
||||||
|
|||||||
Reference in New Issue
Block a user