X-Git-Url: http://git.refcnt.org/?a=blobdiff_plain;f=colorize.c;h=7683e1c70c6137f0ecf316fe3fd31f14e2fbff4c;hb=061db3b04401177fa9348785f71c7c5cc4946142;hp=d12822888f7c51996462df188afe6d605351750d;hpb=38114a984055e8491772cfb7824be517ff2ec83f;p=colorize.git diff --git a/colorize.c b/colorize.c index d128228..7683e1c 100644 --- a/colorize.c +++ b/colorize.c @@ -369,13 +369,9 @@ process_opts (int argc, char **argv) case 0: /* long opts */ switch (opt_type) { - case OPT_ATTR: { - char *opt; - opt = xstrdup (optarg); - process_opt_attr (opt); - free (opt); + case OPT_ATTR: + process_opt_attr (optarg); break; - } case OPT_CLEAN: clean = true; break; @@ -436,7 +432,7 @@ process_opt_attr (const char *p) vfprintf_fail (formats[FMT_GENERIC], "--attr switch must have strings separated by ,"); else { - /* If atttributes are added to this "list", also increase MAX_ATTRIBUTE_CHARS! */ + /* If attributes are added to this "list", also increase MAX_ATTRIBUTE_CHARS! */ if (p - s == 4 && strneq (s, "bold", 4)) write_attr (1); else if (p - s == 10 && strneq (s, "underscore", 10))