summaryrefslogtreecommitdiff
path: root/src/Selection.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2022-06-17 20:44:12 -0400
committerThomas E. Dickey <dickey@invisible-island.net>2022-06-18 06:36:49 -0400
commit806aefc8c6175b6252a300905a327e9d60939af7 (patch)
treef6413008b2fc8c274598c89e70faf147c45b0d4d /src/Selection.c
parenta80c543bb9955199619a2cb6280b89a879fd8811 (diff)
cppcheck fixes (const, null dereferencing, uninitialized, scope)
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/Selection.c')
-rw-r--r--src/Selection.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Selection.c b/src/Selection.c
index 32984b3..9215d05 100644
--- a/src/Selection.c
+++ b/src/Selection.c
@@ -1610,6 +1610,7 @@ GetSelectionValue(Widget widget,
RequestRec req;
ctx->req = &req;
+ memset(&req, 0, sizeof(req));
req.ctx = ctx;
req.event.time = time;
ctx->ref_count++;
@@ -2032,6 +2033,9 @@ CleanupRequest(Display *dpy, QueuedRequestInfo qi, Atom sel)
{
int i, j, n;
+ if (qi == NULL)
+ return;
+
i = 0;
/* Remove this selection from the list */