From 545aaa75697fe75b0953a66f0730a26ab7f4fddf Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 22 Sep 2010 23:10:49 +0200 Subject: [PATCH] Use sstrdup() instead of strdup() --- src/config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.c b/src/config.c index 972e376c..6c80b7f2 100644 --- a/src/config.c +++ b/src/config.c @@ -252,7 +252,7 @@ static char *get_config_path() { if ((xdg_config_dirs = getenv("XDG_CONFIG_DIRS")) == NULL) xdg_config_dirs = "/etc/xdg"; - char *buf = strdup(xdg_config_dirs); + char *buf = sstrdup(xdg_config_dirs); char *tok = strtok(buf, ":"); while (tok != NULL) { tok = glob_path(tok); @@ -273,7 +273,7 @@ static char *get_config_path() { if (path_exists(config_path)) return config_path; - config_path = strdup("/etc/i3/config"); + config_path = sstrdup("/etc/i3/config"); if (!path_exists(config_path)) die("Neither $XDG_CONFIG_HOME/i3/config, nor " "$XDG_CONFIG_DIRS/i3/config, nor ~/.i3/config nor " -- 2.39.5