Re: Remove extra brackets from MINIMUM definition ber.c
On 05/30/17 20:15, Ted Unangst wrote: Fred wrote: I was greping the tree for MINIMUM and this one stood out as it was (((a) rather than ((a). not sure why this one stood out. the 16 definitions of MAXIMUM in bin and sbin are all the same. i don't think we really need churn changing either way. Okay Cheers Fred
Re: Remove extra brackets from MINIMUM definition ber.c
Fred wrote: > I was greping the tree for MINIMUM and this one stood out as it was > (((a) rather than ((a). not sure why this one stood out. the 16 definitions of MAXIMUM in bin and sbin are all the same. i don't think we really need churn changing either way.
Re: Remove extra brackets from MINIMUM definition ber.c
On 05/30/17 19:57, Theo de Raadt wrote: No. This is consistant with a couple hundred others in the tree, which were originally copied from sys/param.h before we cleaned userland from using the file. The brackets were good enough for CSRG, and they are good enough for me... This patch removes the redundant brackets form the MINIMUM macro in ber.c Cheers Fred Index: ber.c === RCS file: /cvs/src/usr.sbin/ldapd/ber.c,v retrieving revision 1.12 diff -u -p -u -p -r1.12 ber.c --- ber.c 11 Feb 2017 20:40:03 - 1.12 +++ ber.c 30 May 2017 17:34:14 - @@ -31,7 +31,7 @@ #include "ber.h" -#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) +#define MINIMUM(a, b) ((a) < (b) ? (a) : (b)) #define BER_TYPE_CONSTRUCTED 0x20/* otherwise primitive */ #define BER_TYPE_SINGLE_MAX 30 I was greping the tree for MINIMUM and this one stood out as it was (((a) rather than ((a). I have also noticed that their are two minimum definitions in the tcpdump code one is MIN(a, b) the other is min(a, b) would you be interested in a diffs that converted them both to MINIMUM? Cheers Fred
Re: Remove extra brackets from MINIMUM definition ber.c
No. This is consistant with a couple hundred others in the tree, which were originally copied from sys/param.h before we cleaned userland from using the file. The brackets were good enough for CSRG, and they are good enough for me... > This patch removes the redundant brackets form the MINIMUM macro in ber.c > > Cheers > > Fred > > Index: ber.c > === > RCS file: /cvs/src/usr.sbin/ldapd/ber.c,v > retrieving revision 1.12 > diff -u -p -u -p -r1.12 ber.c > --- ber.c 11 Feb 2017 20:40:03 - 1.12 > +++ ber.c 30 May 2017 17:34:14 - > @@ -31,7 +31,7 @@ > > #include "ber.h" > > -#define MINIMUM(a, b)(((a) < (b)) ? (a) : (b)) > +#define MINIMUM(a, b)((a) < (b) ? (a) : (b)) > > #define BER_TYPE_CONSTRUCTED0x20/* otherwise primitive */ > #define BER_TYPE_SINGLE_MAX 30 >
Remove extra brackets from MINIMUM definition ber.c
This patch removes the redundant brackets form the MINIMUM macro in ber.c Cheers Fred Index: ber.c === RCS file: /cvs/src/usr.sbin/ldapd/ber.c,v retrieving revision 1.12 diff -u -p -u -p -r1.12 ber.c --- ber.c 11 Feb 2017 20:40:03 - 1.12 +++ ber.c 30 May 2017 17:34:14 - @@ -31,7 +31,7 @@ #include "ber.h" -#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) +#define MINIMUM(a, b) ((a) < (b) ? (a) : (b)) #define BER_TYPE_CONSTRUCTED 0x20/* otherwise primitive */ #define BER_TYPE_SINGLE_MAX30