mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-11-24 08:24:23 +03:00
src: remove use of the INT_MULTIPLY_OVERFLOW macro
The GLib g_size_checked_mul() function is not quite the same signature, and gives compiler warnings due to not correctly casting from gsize to guint64/32. Implementing a replacement for INT_MULTIPLY_OVERFLOW is easy enough to do ourselves. Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -38,6 +38,8 @@
|
||||
# define sa_assert(expr) /* empty */
|
||||
#endif
|
||||
|
||||
#define VIR_INT_MULTIPLY_OVERFLOW(a,b) (G_UNLIKELY ((b) > 0 && (a) > G_MAXINT / (b)))
|
||||
|
||||
/* The library itself is allowed to use deprecated functions /
|
||||
* variables, so effectively undefine the deprecated attribute
|
||||
* which would otherwise be defined in libvirt.h.
|
||||
|
||||
Reference in New Issue
Block a user