Avoid unnecessary string duplication
Patch status: merged
Patch by Marco Hunsicker
Long description:
This patch removes an unnecessary string duplication that was only used to avoid a compiler warning.
To apply this patch, use:
curl http://cr.i3wm.org/patch/470/raw.patch | git am
b/i3status.c
| 15 |
@@ -104,8 +104,8 @@ static int parse_align(cfg_t *context, cfg_opt_t *option, const char *value, voi |
| 16 |
die("Invalid alignment attribute found in section %s, line %d: \"%s\"\n"
|
| 17 |
"Valid attributes are: left, center, right\n", context->name, context->line, value); |
| 18 |
|
| 19 |
- char **cresult = result; |
| 20 |
- *cresult = sstrdup(value); |
| 21 |
+ const char **cresult = result; |
| 22 |
+ *cresult = value; |
| 23 |
|
| 24 |
return 0; |
| 25 |
} |