]> gitweb.michael.orlitzky.com - libsvgtiny.git/commitdiff
Revert "src/svgtiny_css.c: fix uninitalized use in node_is_lang()"
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 22 Oct 2024 10:27:13 +0000 (06:27 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 22 Oct 2024 10:27:13 +0000 (06:27 -0400)
This reverts commit 29e40ed74de9f729755aa45459ff4f770b5be9ca. It's
better to ensure that the function returning "match" does what it says
it does (forthcoming).

src/svgtiny_css.c

index d69fa5c827723dd3312674b6980c7cb3c1377184..4856ac3f7bdefe4856f4bbf49415b6bf2c796415 100644 (file)
@@ -1796,10 +1796,7 @@ static css_error node_is_lang(void *pw, void *node,
        dom_exception d_err;
        dom_node *n; /* current node */
        dom_node *p; /* parent node */
-
-       /* retval from node_has_attribute_substring(), must be
-        * initialized in case that function bails early */
-       bool match = false;
+       bool match;  /* retval from node_has_attribute_substring() */
 
        /* Define the attribute name "lang" that we're looking for.
         * We only use a css_qname here because that's what the