mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
parser: Move xmlSaturatedAdd to private header
This commit is contained in:
16
parser.c
16
parser.c
@@ -408,22 +408,6 @@ xmlNsWarn(xmlParserCtxtPtr ctxt, xmlParserErrors error,
|
||||
info1, info2, info3, 0, msg, info1, info2, info3);
|
||||
}
|
||||
|
||||
static void
|
||||
xmlSaturatedAdd(unsigned long *dst, unsigned long val) {
|
||||
if (val > ULONG_MAX - *dst)
|
||||
*dst = ULONG_MAX;
|
||||
else
|
||||
*dst += val;
|
||||
}
|
||||
|
||||
static void
|
||||
xmlSaturatedAddSizeT(unsigned long *dst, size_t val) {
|
||||
if (val > ULONG_MAX - *dst)
|
||||
*dst = ULONG_MAX;
|
||||
else
|
||||
*dst += val;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check for non-linear entity expansion behaviour.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user