summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-10-29 11:23:05 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-10-29 11:23:05 -0700
commit1e8c563f178ce5083b76b98126c359e91a6cedd9 (patch)
treee842858c0ab795d4ddf84589b3c3bb13e2963986
parentaa3c53eeaf9ea57e2c29ae6955cff598d0d51ffa (diff)
Remove unnecessary casts from malloc() and XFree() calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--dsimple.c6
-rw-r--r--transSet.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/dsimple.c b/dsimple.c
index c673833..98294c4 100644
--- a/dsimple.c
+++ b/dsimple.c
@@ -264,7 +264,7 @@ Window_With_Name (Display *disp, Window top, char *name)
break;
}
if (children)
- XFree ((char *) children);
+ XFree (children);
return (w);
}
@@ -297,7 +297,7 @@ Window_With_Name_Regex_Recurse (Display *disp, Window top,
break;
}
if (children)
- XFree ((char *) children);
+ XFree (children);
return (w);
}
@@ -308,7 +308,7 @@ Window_With_Name_Regex (Display *disp, Window top, char *name)
int err_no = 0;
regex_t *regexp_name;
Window target_win;
- regexp_name = (regex_t *) malloc (sizeof (regex_t));
+ regexp_name = malloc (sizeof (regex_t));
if ((err_no = regcomp (regexp_name, name, 0)) != 0) {
size_t length;
char *buffer;
diff --git a/transSet.c b/transSet.c
index 0924b2e..8c45486 100644
--- a/transSet.c
+++ b/transSet.c
@@ -83,7 +83,7 @@ Get_Top_Window (Display *disp, Window child) {
&num_children))
Fatal_Error ("Can't query window tree.");
- XFree ((void *) child_list);
+ XFree (child_list);
if (parent == root)
return child;
@@ -92,7 +92,7 @@ Get_Top_Window (Display *disp, Window child) {
if (!XQueryTree (disp, child, &root, &parent, &child_list,
&num_children))
Fatal_Error ("Can't query window tree.");
- XFree ((void *) child_list);
+ XFree (child_list);
}
return child;
}
@@ -296,7 +296,7 @@ main (int argc, char **argv)
&left, &data) == Success)
&& (data != None)) {
memcpy (&current_opacity, data, sizeof (unsigned int));
- XFree ((void *) data);
+ XFree (data);
if (flag_verbose)
printf ("Found transparency: %g\n",
(double) current_opacity / OPAQUE);