Replace wlan_min() with the generic min_t(), remove unused wlan_max().
Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
char essid[IW_ESSID_MAX_SIZE + 1];
int size;
- size = wlan_min(IW_ESSID_MAX_SIZE, bss->ssid.data.len);
+ size = min_t(unsigned short, IW_ESSID_MAX_SIZE, bss->ssid.data.len);
memset(&essid, 0, sizeof (essid));
memcpy(&essid, bss->ssid.data.data, size);
WLAN_LOG_DEBUG(1, " essid size = %d\n", size);
/*--- General Macros ------------------------------------------*/
/*=============================================================*/
-#define wlan_max(a, b) (((a) > (b)) ? (a) : (b))
-#define wlan_min(a, b) (((a) < (b)) ? (a) : (b))
-
#define wlan_isprint(c) (((c) > (0x19)) && ((c) < (0x7f)))
#define wlan_hexchar(x) (((x) < 0x0a) ? ('0' + (x)) : ('a' + ((x) - 0x0a)))