commit 7980cb5f5146c89ce5a044cf7b144b22ea95d6ef
Author: Hiltjo Posthuma <[email protected]>
AuthorDate: Sun Mar 28 14:52:03 2021 +0200
Commit: Hiltjo Posthuma <[email protected]>
CommitDate: Sun Mar 28 14:52:03 2021 +0200
estrdup errors out, so remove the condition
diff --git a/svkbd.c b/svkbd.c
index 77583f1..7042cd4 100644
--- a/svkbd.c
+++ b/svkbd.c
@@ -718,10 +718,8 @@ readxresources(void)
XrmInitialize();
if ((xrm = XResourceManagerString(drw->dpy))) {
-
xdb = XrmGetStringDatabase(xrm);
-
if (XrmGetResource(xdb, "svkbd.font", "*", &type, &xval) &&
!fonts[0])
fonts[0] = estrdup(xval.addr);
@@ -1144,10 +1142,8 @@ main(int argc, char *argv[])
if ((tmp = getenv("SVKBD_ENABLEOVERLAYS")))
enableoverlays = atoi(tmp);
}
- if ((tmp = getenv("SVKBD_LAYERS"))) {
- if (!(layer_names_list = estrdup(tmp)))
- die("memory allocation error");
- }
+ if ((tmp = getenv("SVKBD_LAYERS")))
+ layer_names_list = estrdup(tmp);
if ((tmp = getenv("SVKBD_HEIGHTFACTOR")))
heightfactor = atoi(tmp);
@@ -1198,8 +1194,7 @@ main(int argc, char *argv[])
if (i >= argc - 1)
continue;
free(layer_names_list);
- if (!(layer_names_list = estrdup(argv[++i])))
- die("memory allocation error");
+ layer_names_list = estrdup(argv[++i]);
} else if (!strcmp(argv[i], "-s")) {
if (i >= argc - 1)
continue;