diff options
Diffstat (limited to 'src/mm-modem-helpers.h')
-rw-r--r-- | src/mm-modem-helpers.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mm-modem-helpers.h b/src/mm-modem-helpers.h index c41d1d31..9c1be81f 100644 --- a/src/mm-modem-helpers.h +++ b/src/mm-modem-helpers.h @@ -504,4 +504,10 @@ gboolean mm_parse_supl_address (const gchar *supl, guint16 *out_port, GError **error); +/*****************************************************************************/ + +/* Useful when clamp-ing an unsigned integer with implicit low limit set to 0, + * and in order to avoid -Wtype-limits warnings. */ +#define MM_CLAMP_HIGH(x, high) (((x) > (high)) ? (high) : (x)) + #endif /* MM_MODEM_HELPERS_H */ |