From: Matthew Fernandez Date: Thu, 29 Oct 2020 01:08:42 +0000 (-0700) Subject: remove unused addSpace parameter to gv_trim_zeros() X-Git-Tag: 2.46.0~20^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a81e87d4372c3ee48d25deecaa2b91d430d42ce;p=graphviz remove unused addSpace parameter to gv_trim_zeros() --- diff --git a/lib/gvc/gvdevice.c b/lib/gvc/gvdevice.c index ccf8e46f4..83a0e7d95 100644 --- a/lib/gvc/gvdevice.c +++ b/lib/gvc/gvdevice.c @@ -535,9 +535,8 @@ int main (int argc, char *argv[]) /* gv_trim_zeros * Trailing zeros are removed and decimal point, if possible. -* Add trailing space if addSpace is non-zero. */ -static void gv_trim_zeros(char* buf, int addSpace) +static void gv_trim_zeros(char* buf) { char* dotp; char* p; @@ -552,13 +551,6 @@ static void gv_trim_zeros(char* buf, int addSpace) else p++; } - else if (addSpace) - p = buf + strlen(buf); - - if (addSpace) { /* p points to null byte */ - *p++ = ' '; - *p = '\0'; - } } void gvprintdouble(GVJ_t * job, double num) @@ -573,7 +565,7 @@ void gvprintdouble(GVJ_t * job, double num) char buf[50]; snprintf(buf, 50, "%.02f", num); - gv_trim_zeros(buf, 0); + gv_trim_zeros(buf); gvwrite(job, buf, strlen(buf)); }