svkbd

simple virtual keyboard
git clone git://git.suckless.org/svkbd
Log | Files | Refs | README | LICENSE

commit 7980cb5f5146c89ce5a044cf7b144b22ea95d6ef
parent 9c492b6913d4c4e18c6f0e690bad0785ca24b69d
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 28 Mar 2021 14:52:03 +0200

estrdup errors out, so remove the condition

Diffstat:
Msvkbd.c | 11+++--------
1 file changed, 3 insertions(+), 8 deletions(-)

diff --git 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;