From 91e8a0282ca92b05edd3761ccb9134156d00126a Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Wed, 5 Aug 2020 14:34:45 +0200 Subject: Remove useless 'if (...)' - dasharray_ can never be NULL unless if memory allocation failed previously - if dasharray_ was NULL, the previous strcmp() would have crashed anyway (but it can't be NULL, see above) --- src/drivers/SVG/Fl_SVG_File_Surface.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/drivers') diff --git a/src/drivers/SVG/Fl_SVG_File_Surface.cxx b/src/drivers/SVG/Fl_SVG_File_Surface.cxx index 8f5c4ec95..ae0172fc4 100644 --- a/src/drivers/SVG/Fl_SVG_File_Surface.cxx +++ b/src/drivers/SVG/Fl_SVG_File_Surface.cxx @@ -213,7 +213,7 @@ void Fl_SVG_Graphics_Driver::compute_dasharray(float s, char *dashes) { int dash_part = line_style_ & 0xFF; if (dash_part == FL_SOLID) { if (strcmp(dasharray_, "none")) { - if (dasharray_) free(dasharray_); + free(dasharray_); dasharray_ = fl_strdup("none"); } } else { -- cgit v1.2.3