summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Cursor.c2
-rw-r--r--src/Xfixes.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Cursor.c b/src/Cursor.c
index 33590b7..4742240 100644
--- a/src/Cursor.c
+++ b/src/Cursor.c
@@ -193,7 +193,7 @@ XFixesGetCursorName (Display *dpy, Cursor cursor, Atom *atom)
return NULL;
}
*atom = rep.atom;
- if ((name = (char *) Xmalloc(rep.nbytes+1))) {
+ if ((name = Xmalloc(rep.nbytes+1)) != NULL) {
_XReadPad(dpy, name, (long)rep.nbytes);
name[rep.nbytes] = '\0';
} else {
diff --git a/src/Xfixes.c b/src/Xfixes.c
index c32ee39..b8aca09 100644
--- a/src/Xfixes.c
+++ b/src/Xfixes.c
@@ -50,7 +50,7 @@ XFixesExtAddDisplay (XFixesExtInfo *extinfo,
XFixesExtDisplayInfo *info;
int ev;
- info = (XFixesExtDisplayInfo *) Xmalloc (sizeof (XFixesExtDisplayInfo));
+ info = Xmalloc (sizeof (XFixesExtDisplayInfo));
if (!info) return NULL;
info->display = dpy;
@@ -154,7 +154,7 @@ XFixesExtRemoveDisplay (XFixesExtInfo *extinfo, Display *dpy)
if (info == extinfo->cur) extinfo->cur = NULL; /* flush cache */
_XUnlockMutex(_Xglobal_lock);
- Xfree ((char *) info);
+ Xfree (info);
return 1;
}