summaryrefslogtreecommitdiff
path: root/src/xrdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xrdb.c')
-rw-r--r--src/xrdb.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/xrdb.c b/src/xrdb.c
index 1e68205b630..624bafa5e92 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -74,10 +74,8 @@ static char *
x_get_customization_string (XrmDatabase db, const char *name,
const char *class)
{
- char *full_name
- = (char *) alloca (strlen (name) + sizeof ("customization") + 3);
- char *full_class
- = (char *) alloca (strlen (class) + sizeof ("Customization") + 3);
+ char *full_name = alloca (strlen (name) + sizeof "customization" + 3);
+ char *full_class = alloca (strlen (class) + sizeof "Customization" + 3);
char *result;
sprintf (full_name, "%s.%s", name, "customization");
@@ -206,7 +204,7 @@ magic_file_p (const char *string, ptrdiff_t string_len, const char *class,
if (min (PTRDIFF_MAX, SIZE_MAX) / 2 - 1 - path_len < next_len)
memory_full (SIZE_MAX);
path_size = (path_len + next_len + 1) * 2;
- path = (char *) xrealloc (path, path_size);
+ path = xrealloc (path, path_size);
}
memcpy (path + path_len, next, next_len);
@@ -400,7 +398,7 @@ get_user_db (Display *display)
char *xdefault;
home = gethomedir ();
- xdefault = xmalloc (strlen (home) + sizeof (".Xdefaults"));
+ xdefault = xmalloc (strlen (home) + sizeof ".Xdefaults");
strcpy (xdefault, home);
strcat (xdefault, ".Xdefaults");
db = XrmGetFileDatabase (xdefault);
@@ -434,7 +432,7 @@ get_environ_db (void)
char *home = gethomedir ();
char const *host = get_system_name ();
ptrdiff_t pathsize = strlen (home) + sizeof xdefaults + strlen (host);
- path = (char *) xrealloc (home, pathsize);
+ path = xrealloc (home, pathsize);
strcat (strcat (path, xdefaults), host);
p = path;
}