summaryrefslogtreecommitdiff
path: root/xkbpath.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-10 14:23:11 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-11 15:36:06 -0800
commit5655379ce89ab55f25a536972aaa310480de9432 (patch)
treeaa9cffb76485caf32da96d8d689f5a0ce6ab6c11 /xkbpath.c
parent2ac6a7f029d8855fbb4e8024aab0511727ac3a67 (diff)
downloadxorg-app-xkbcomp-5655379ce89ab55f25a536972aaa310480de9432.tar.gz
Remove unnecessary checks for NULL pointers before calling free()
Not needed in C89 and later Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xkbpath.c')
-rw-r--r--xkbpath.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/xkbpath.c b/xkbpath.c
index 1e2b243..695c13e 100644
--- a/xkbpath.c
+++ b/xkbpath.c
@@ -182,11 +182,8 @@ XkbClearIncludePath(void)
{
for (int i = 0; i < nPathEntries; i++)
{
- if (includePath[i] != NULL)
- {
- free(includePath[i]);
- includePath[i] = NULL;
- }
+ free(includePath[i]);
+ includePath[i] = NULL;
}
nPathEntries = 0;
}