}
}
if (walk != beginning) {
- char *str = scalloc(walk - beginning + 1);
+ char *str = scalloc(walk - beginning + 1, 1);
/* We copy manually to handle escaping of characters. */
int inpos, outpos;
for (inpos = 0, outpos = 0;
switch (o) {
case 's':
FREE(socket_path);
- socket_path = strdup(optarg);
+ socket_path = sstrdup(optarg);
break;
case 'v':
printf("i3-config-wizard " I3_VERSION "\n");
struct stat stbuf;
sasprintf(&config_dir, "%s/i3", xdg_config_home);
if (stat(config_dir, &stbuf) != 0)
- if (!mkdirp(config_dir))
+ if (mkdirp(config_dir, DEFAULT_DIR_MODE) != 0)
err(EXIT_FAILURE, "mkdirp(%s) failed", config_dir);
free(config_dir);
free(xdg_config_home);