forked from osmocom/wireshark
From Alexis La Goutte:
Replace all *_min()/*_max() by MIN() and MAX(). svn path=/trunk/; revision=34770
This commit is contained in:
parent
562eb76905
commit
d6c7ebee86
|
@ -56,9 +56,6 @@
|
|||
#include "atm.h"
|
||||
#include "erf.h"
|
||||
|
||||
#ifndef min
|
||||
#define min(a, b) ((a) > (b) ? (b) : (a))
|
||||
#endif
|
||||
|
||||
static int erf_read_header(FILE_T fh,
|
||||
struct wtap_pkthdr *phdr,
|
||||
|
@ -447,7 +444,7 @@ static int erf_read_header(FILE_T fh,
|
|||
|
||||
if (phdr != NULL) {
|
||||
phdr->len = g_htons(erf_header->wlen);
|
||||
phdr->caplen = min( g_htons(erf_header->wlen),
|
||||
phdr->caplen = MIN( g_htons(erf_header->wlen),
|
||||
g_htons(erf_header->rlen) - (guint32)sizeof(*erf_header) - skiplen );
|
||||
}
|
||||
return TRUE;
|
||||
|
|
|
@ -30,10 +30,6 @@
|
|||
#include "buffer.h"
|
||||
#include "netscaler.h"
|
||||
|
||||
/* Defines imported from netscaler code: nstypes.h */
|
||||
|
||||
#define ns_min(a, b) ((a<b)?a:b)
|
||||
|
||||
/* Defines imported from netscaler code: nsperfrc.h */
|
||||
|
||||
#define NSPR_SIGSTR_V10 "NetScaler Performance Data"
|
||||
|
@ -574,7 +570,7 @@ nspm_signature_version(wtap *wth, gchar *nstrace_buf, gint32 len)
|
|||
bytes_read = file_read(dp, 1, len, wth->fh);
|
||||
if (bytes_read == len) {
|
||||
|
||||
for ( ; len > (gint32)(ns_min(sizeof(NSPR_SIGSTR_V10), sizeof(NSPR_SIGSTR_V20))); dp++, len--)
|
||||
for ( ; len > (gint32)(MIN(sizeof(NSPR_SIGSTR_V10), sizeof(NSPR_SIGSTR_V20))); dp++, len--)
|
||||
{
|
||||
#define sigv10p ((nspr_signature_v10_t*)dp)
|
||||
if ((pletohs(&sigv10p->nsprRecordType) == NSPR_SIGNATURE_V10) &&
|
||||
|
|
Loading…
Reference in New Issue