From: Matthew Fernandez Date: Sun, 15 Jan 2023 21:28:12 +0000 (-0800) Subject: gvcolor: remove 'NOCOLORNAMES' code path X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a423cd0c018973ae2b48a42d637ceb09761b5619;p=graphviz gvcolor: remove 'NOCOLORNAMES' code path Nothing in the build systems define this. Furthermore, this code does not work. It reads uninitialized memory from `buf`. --- diff --git a/cmd/tools/colxlate.c b/cmd/tools/colxlate.c index a125b2f3a..48c71518f 100644 --- a/cmd/tools/colxlate.c +++ b/cmd/tools/colxlate.c @@ -25,8 +25,6 @@ typedef struct hsbcolor_t { unsigned char h, s, b; } hsbcolor_t; - -#ifndef NOCOLORNAMES #include "colortbl.h" static char *canoncolor(const char *orig, char *out) @@ -76,9 +74,3 @@ char *colorxlate(char *str, char *buf) ((double) last->s) / 255, ((double) last->b) / 255); return buf; } -#else -char *colorxlate(char *str, char *buf) -{ - return str; -} -#endif