From aaecdc92e237d0873578f26773085108cfb972e6 Mon Sep 17 00:00:00 2001 From: Ruslan Garipov Date: Tue, 12 Nov 2024 16:42:36 +0500 Subject: [PATCH] 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 --- parser.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/parser.c b/parser.c index a330d027..fec1225b 100644 --- a/parser.c +++ b/parser.c @@ -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