summaryrefslogtreecommitdiff
path: root/src/Convert.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2019-05-16 20:53:42 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2019-05-18 06:42:03 -0400
commit1f0e3238352a497a59a36e0b8a5b4723c634b2e1 (patch)
treed49a598905cf10e28ff7d21a627e2f90a6e79ada /src/Convert.c
parentfb78a7c881adbe46f1f8c6e8e429bc8963c9b3e8 (diff)
fix most clang --analyze warnings about null-pointers
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/Convert.c')
-rw-r--r--src/Convert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Convert.c b/src/Convert.c
index bd7ec2a..f9f241e 100644
--- a/src/Convert.c
+++ b/src/Convert.c
@@ -404,7 +404,7 @@ CacheEnter(
(void) memmove((char *)p->from.addr, (char *)from->addr, from->size);
}
p->num_args = (unsigned short) num_args;
- if (num_args) {
+ if (num_args && args) {
XrmValue *pargs = CARGS(p);
register Cardinal i;
for (i = 0; i < num_args; i++) {
@@ -453,7 +453,7 @@ static void FreeCacheRec(
*(CEXT(p)->prev) = p->next;
if (p->next && p->next->has_ext)
CEXT(p->next)->prev = CEXT(p)->prev;
- } else {
+ } else if (prev) {
*prev = p->next;
if (p->next && p->next->has_ext)
CEXT(p->next)->prev = prev;