diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2021-11-11 09:39:52 -0500 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2021-11-11 09:39:52 -0500 | 
| commit | 7a8ce9d56dec3844031563c3c55bed8eb3b692d5 (patch) | |
| tree | 540ad9555825587c56143bcfc1d1172e4977a00c /pathd | |
| parent | 7347a4859d4b984cea0aef769a16622d3f02e44f (diff) | |
*: use compiler.h MIN/MAX macros instead of everyone having one
We had various forms of min/max macros across multiple daemons
all of which duplicated what we have in compiler.h.  Convert
everyone to use the `correct` ones
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'pathd')
| -rw-r--r-- | pathd/path_pcep_controller.c | 10 | 
1 files changed, 1 insertions, 9 deletions
diff --git a/pathd/path_pcep_controller.c b/pathd/path_pcep_controller.c index 449c40c16c..162c53590f 100644 --- a/pathd/path_pcep_controller.c +++ b/pathd/path_pcep_controller.c @@ -38,14 +38,6 @@  #define MAX_RECONNECT_DELAY 120 -#define min(a, b)                                                              \ -	({                                                                     \ -		__typeof__(a) _a = (a);                                        \ -		__typeof__(b) _b = (b);                                        \ -		_a <= _b ? _a : _b;                                            \ -	}) - -  /* Event handling data structures */  enum pcep_ctrl_event_type {  	EV_UPDATE_PCC_OPTS = 1, @@ -1078,7 +1070,7 @@ void remove_pcc_state(struct ctrl_state *ctrl_state,  uint32_t backoff_delay(uint32_t max, uint32_t base, uint32_t retry_count)  { -	uint32_t a = min(max, base * (1 << retry_count)); +	uint32_t a = MIN(max, base * (1 << retry_count));  	uint64_t r = frr_weak_random(), m = RAND_MAX;  	uint32_t b = (a / 2) + (r * (a / 2)) / m;  	return b;  | 
