From: Matthew Fernandez Date: Sat, 6 Mar 2021 01:59:23 +0000 (-0800) Subject: remove redundant swidth computation X-Git-Tag: 2.47.1~55^2~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a4edf038bfbcb14b960a1ede52ebdfd0a70567c5;p=graphviz remove redundant swidth computation The values being computed here were already computed in a previous block and have not changed since. There was clearly copy-pasted wholesale from the code above it. --- diff --git a/cmd/gvmap/make_map.c b/cmd/gvmap/make_map.c index ad7ad2c19..dac318208 100644 --- a/cmd/gvmap/make_map.c +++ b/cmd/gvmap/make_map.c @@ -346,9 +346,6 @@ static void dot_polygon(char **sbuff, int *len, int *len_max, int np, float *xp, ret = sprintf(&((*sbuff)[*len]), " c %zu -%s C %zu -%s P %d ", strlen(cstring), cstring, strlen(cstring), cstring, np); } else { if (line_width > 0){ - sprintf(swidth,"%f",line_width); - len_swidth = strlen(swidth); - sprintf(swidth,"S %zu -setlinewidth(%f)",len_swidth+14, line_width); ret = sprintf(&((*sbuff)[*len]), " c %zu -%s %s L %d ", strlen(cstring), cstring, swidth, np); } else { ret = sprintf(&((*sbuff)[*len]), " c %zu -%s L %d ", strlen(cstring), cstring, np);