-/* $OpenBSD: print-smb.c,v 1.4 2009/10/27 23:59:55 deraadt Exp $ */
+/* $OpenBSD: print-smb.c,v 1.5 2017/05/30 20:10:45 deraadt Exp $ */
/*
Copyright (C) Andrew Tridgell 1995-1999
f4 = "|data ";
}
- fdata(words+1,f1,MIN(words+1+2*CVAL(words,0),maxbuf));
+ fdata(words+1,f1,MINIMUM(words+1+2*CVAL(words,0),maxbuf));
fdata(data1+2,f2,maxbuf - (paramlen + datalen));
if (!strcmp(data1+2,"\\MAILSLOT\\BROWSE")) {
return;
}
- if (paramlen) fdata(param,f3,MIN(param+paramlen,maxbuf));
- if (datalen) fdata(data,f4,MIN(data+datalen,maxbuf));
+ if (paramlen) fdata(param,f3,MINIMUM(param+paramlen,maxbuf));
+ if (datalen) fdata(data,f4,MINIMUM(data+datalen,maxbuf));
}
}
if (f1)
- fdata(words+1,f1,MIN(words + 1 + CVAL(words,0)*2,maxbuf));
+ fdata(words+1,f1,MINIMUM(words + 1 + CVAL(words,0)*2,maxbuf));
if (f2)
- fdata(data+2,f2,MIN(data + 2 + SVAL(data,0),maxbuf));
+ fdata(data+2,f2,MINIMUM(data + 2 + SVAL(data,0),maxbuf));
}
static void print_sesssetup(uchar *words,uchar *data,uchar *buf,uchar *maxbuf)
}
if (f1)
- fdata(words+1,f1,MIN(words + 1 + CVAL(words,0)*2,maxbuf));
+ fdata(words+1,f1,MINIMUM(words + 1 + CVAL(words,0)*2,maxbuf));
if (f2)
- fdata(data+2,f2,MIN(data + 2 + SVAL(data,0),maxbuf));
+ fdata(data+2,f2,MINIMUM(data + 2 + SVAL(data,0),maxbuf));
}
-/* $OpenBSD: smb.h,v 1.1 2000/12/07 22:36:46 mickey Exp $ */
+/* $OpenBSD: smb.h,v 1.2 2017/05/30 20:10:45 deraadt Exp $ */
/*
Copyright (C) Andrew Tridgell 1995-1999
#define uchar unsigned char
#endif
-#ifndef MIN
-#define MIN(a,b) ((a)<(b)?(a):(b))
-#endif
+#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b))
/* the complete */
#define SMBmkdir 0x00 /* create directory */