diff options
author | Walter Harms <wharms@bfs.de> | 2019-01-08 21:25:00 +0100 |
---|---|---|
committer | Walter Harms <wharms@bfs.de> | 2019-01-08 21:25:00 +0100 |
commit | 102ba41a668568d7e7e506b0ab9f064d1f2c4ec5 (patch) | |
tree | 31409fc97f30de33c267f55655e945a9a77f49a9 /src/VarGet.c | |
parent | 8a25977b7ef3a5e96e57d0d56d597c9436a14871 (diff) |
no need to check XFree arguments
Diffstat (limited to 'src/VarGet.c')
-rw-r--r-- | src/VarGet.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/VarGet.c b/src/VarGet.c index 7b4cea6..ccd4d10 100644 --- a/src/VarGet.c +++ b/src/VarGet.c @@ -86,9 +86,7 @@ XtVaGetSubresources( _XtGetSubresources(widget, base, name, class, resources, num_resources, NULL, 0, args, num_args); - if (num_args != 0) { - XtFree((XtPointer)args); - } + XtFree((XtPointer)args); va_end(var); UNLOCK_APP(app); @@ -116,9 +114,7 @@ XtVaGetApplicationResources(Widget widget, XtPointer base, XtResourceList resour _XtGetApplicationResources(widget, base, resources, num_resources, NULL, 0, args, num_args); - if (num_args != 0) { - XtFree((XtPointer)args); - } + XtFree((XtPointer)args); va_end(var); UNLOCK_APP(app); @@ -273,9 +269,7 @@ XtVaGetValues(Widget widget, ...) } va_end(var); - if (resources != (XtResourceList)NULL) { - XtFree((XtPointer)resources); - } + XtFree((XtPointer)resources); if (total_count != typed_count) { XtGetValues(widget, args, count); @@ -307,7 +301,5 @@ XtVaGetSubvalues(XtPointer base,XtResourceList resources, Cardinal num_resource XtGetSubvalues(base, resources, num_resources, args, num_args); - if (num_args != 0) { - XtFree((XtPointer)args); - } + XtFree((XtPointer)args); } |