aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/Context.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-10-19 22:15:01 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-10-19 22:15:01 +0200
commit70ac75f4ab184c21d11b9840a47362610aaef481 (patch)
tree183b9ec7e6897fb2cea7296b461a35ca93dfce6e /nx-X11/lib/X11/Context.c
parent6c303d9e4ffd162b8c7f59a4b135e592d923a656 (diff)
parent70e9d346fe34af127d2c827c3678e53d0f4312ae (diff)
downloadnx-libs-70ac75f4ab184c21d11b9840a47362610aaef481.tar.gz
nx-libs-70ac75f4ab184c21d11b9840a47362610aaef481.tar.bz2
nx-libs-70ac75f4ab184c21d11b9840a47362610aaef481.zip
Merge branch 'uli42-pr/libX11_further_backports' into 3.6.x
Attributes GH PR #222: https://github.com/ArcticaProject/nx-libs/pull/222
Diffstat (limited to 'nx-X11/lib/X11/Context.c')
-rw-r--r--nx-X11/lib/X11/Context.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/nx-X11/lib/X11/Context.c b/nx-X11/lib/X11/Context.c
index 79ae7d66c..8a078713a 100644
--- a/nx-X11/lib/X11/Context.c
+++ b/nx-X11/lib/X11/Context.c
@@ -111,7 +111,7 @@ static void ResizeTable(DB db)
otable = db->table;
for (i = INITHASHMASK+1; (i + i) < db->numentries; )
i += i;
- db->table = (TableEntry *) Xcalloc((unsigned)i, sizeof(TableEntry));
+ db->table = Xcalloc(i, sizeof(TableEntry));
if (!db->table) {
db->table = otable;
return;
@@ -126,7 +126,7 @@ static void ResizeTable(DB db)
*head = entry;
}
}
- Xfree((char *) otable);
+ Xfree(otable);
}
static void _XFreeContextDB(Display *display)
@@ -140,12 +140,12 @@ static void _XFreeContextDB(Display *display)
for (i = db->mask + 1, pentry = db->table ; --i >= 0; pentry++) {
for (entry = *pentry; entry; entry = next) {
next = entry->next;
- Xfree((char *)entry);
+ Xfree(entry);
}
}
- Xfree((char *) db->table);
+ Xfree(db->table);
_XFreeMutex(&db->linfo);
- Xfree((char *) db);
+ Xfree(db);
}
}
@@ -180,13 +180,13 @@ int XSaveContext(
UnlockDisplay(display);
}
if (!db) {
- db = (DB) Xmalloc(sizeof(DBRec));
+ db = Xmalloc(sizeof(DBRec));
if (!db)
return XCNOMEM;
db->mask = INITHASHMASK;
- db->table = (TableEntry *)Xcalloc(db->mask + 1, sizeof(TableEntry));
+ db->table = Xcalloc(db->mask + 1, sizeof(TableEntry));
if (!db->table) {
- Xfree((char *)db);
+ Xfree(db);
return XCNOMEM;
}
db->numentries = 0;
@@ -210,7 +210,7 @@ int XSaveContext(
return 0;
}
}
- entry = (TableEntry) Xmalloc(sizeof(TableEntryRec));
+ entry = Xmalloc(sizeof(TableEntryRec));
if (!entry)
return XCNOMEM;
entry->rid = rid;
@@ -289,7 +289,7 @@ int XDeleteContext(Display *display, XID rid, XContext context)
prev = &entry->next) {
if (entry->rid == rid && entry->context == context) {
*prev = entry->next;
- Xfree((char *) entry);
+ Xfree(entry);
db->numentries--;
if (db->numentries < db->mask && db->mask > INITHASHMASK)
ResizeTable(db);