1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-26 00:37:43 +03:00

parser: Assign value without if-statement

This avoids an if-statement, because effectively it does nothing.  And,
for example, binary artifact generated by GCC with -O2 optimization
settings does not contain that if-statement -- the code just uses the
hprefix->name field explicitly.

No functional changes intended.

Signed-off-by: Ruslan Garipov <ruslanngaripov@gmail.com>
This commit is contained in:
Ruslan Garipov
2024-11-12 16:42:36 +05:00
parent 1e4d8c55f0
commit aaecdc92e2

View File

@@ -8804,10 +8804,7 @@ xmlParseAttribute2(xmlParserCtxtPtr ctxt,
return(hname);
}
name = hname.name;
if (hprefix->name != NULL)
prefix = hprefix->name;
else
prefix = NULL;
prefix = hprefix->name;
/*
* get the type if needed