more cppcheck-style fixes

Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
This commit is contained in:
Thomas E. Dickey 2021-05-06 20:10:41 -04:00
parent f807ac9c78
commit 801925839d
No known key found for this signature in database
GPG key ID: 702353E0F7E48EDB
2 changed files with 12 additions and 14 deletions

View file

@ -91,6 +91,7 @@ XcursorAnimateNext (XcursorAnimate *animate)
return cursor;
}
#if RENDER_MAJOR > 0 || RENDER_MINOR >= 5
static int
nativeByteOrder (void)
{
@ -98,6 +99,7 @@ nativeByteOrder (void)
return (*((char *) &x) == 1) ? LSBFirst : MSBFirst;
}
#endif
static XcursorUInt
_XcursorPixelBrightness (XcursorPixel p)

View file

@ -315,9 +315,7 @@ XcursorLibraryLoadImage (const char *file, const char *theme, int size)
f = XcursorScanTheme (theme, file);
if (!f)
f = XcursorScanTheme ("default", file);
if (f == XCURSOR_SCAN_CORE)
return NULL;
if (f)
if (f != NULL && f != XCURSOR_SCAN_CORE)
{
image = XcursorFileLoadImage (f, size);
fclose (f);
@ -338,9 +336,7 @@ XcursorLibraryLoadImages (const char *file, const char *theme, int size)
f = XcursorScanTheme (theme, file);
if (!f)
f = XcursorScanTheme ("default", file);
if (f == XCURSOR_SCAN_CORE)
return NULL;
if (f)
if (f != NULL && f != XCURSOR_SCAN_CORE)
{
images = XcursorFileLoadImages (f, size);
if (images)