From: Michael Stapelberg Date: Wed, 22 Sep 2010 21:10:49 +0000 (+0200) Subject: Use sstrdup() instead of strdup() X-Git-Tag: 4.0~39 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b2eb0cd76917dda141cc18691b527138e350de34;p=i3%2Fi3 Use sstrdup() instead of strdup() --- diff --git a/src/config.c b/src/config.c index cd88da3d..425a995e 100644 --- a/src/config.c +++ b/src/config.c @@ -256,7 +256,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 = resolve_tilde(tok); @@ -277,7 +277,7 @@ static char *get_config_path() { if (path_exists(config_path)) return config_path; - config_path = strdup(SYSCONFDIR "/i3/config"); + config_path = sstrdup(SYSCONFDIR "/i3/config"); if (!path_exists(config_path)) die("Neither $XDG_CONFIG_HOME/i3/config, nor " "$XDG_CONFIG_DIRS/i3/config, nor ~/.i3/config nor "