From 7e81c1a4553c43611ff28944c8c48313e32b1699 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Sat, 8 Sep 2018 18:56:49 +0500 Subject: [PATCH] MagickCore/xwindow.c: remove not needed check (#1292) found by cppcheck there's already check in line 3367 https://github.com/ImageMagick/ImageMagick/blob/master/MagickCore/xwindow.c#L3367 --- MagickCore/xwindow.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/MagickCore/xwindow.c b/MagickCore/xwindow.c index a394851fa..7149c4055 100644 --- a/MagickCore/xwindow.c +++ b/MagickCore/xwindow.c @@ -3374,17 +3374,14 @@ MagickExport XrmDatabase XGetResourceDatabase(Display *display, /* Combine application database. */ - if (client_name != (char *) NULL) - { - /* - Get basename of client. - */ - p=client_name+(strlen(client_name)-1); - while ((p > client_name) && (*p != '/')) - p--; - if (*p == '/') - client_name=p+1; - } + /* + Get basename of client. + */ + p=client_name+(strlen(client_name)-1); + while ((p > client_name) && (*p != '/')) + p--; + if (*p == '/') + client_name=p+1; c=(int) (*client_name); if ((c >= XK_a) && (c <= XK_z)) c-=(XK_a-XK_A); -- 2.40.0