Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
*/
#define MAX_LENGTH 1024
-#define min(a, b) (((a)>(b))?(b):(a))
-
/*
* Private data for the module, stored in the ldb_module private data
*/
}
v = message->elements[i].values[j];
- length = min(MAX_LENGTH, v.length);
+ length = MIN(MAX_LENGTH, v.length);
use_b64_encode = ldb_should_b64_encode(ldb, &v);
if (use_b64_encode) {
const char *encoded = ldb_base64_encode(
#define MAX_LENGTH 1024
-#define min(a, b) (((a)>(b))?(b):(a))
-
/*
* List of attributes considered secret or confidential the values of these
* attributes should not be displayed in log messages.
}
base64 = ldb_should_b64_encode(NULL, &lv);
- len = min(lv.length, MAX_LENGTH);
+ len = MIN(lv.length, MAX_LENGTH);
value = json_new_object();
if (json_is_invalid(&value)) {
goto failure;