From 8a81e87d4372c3ee48d25deecaa2b91d430d42ce Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 28 Oct 2020 18:08:42 -0700 Subject: [PATCH] remove unused addSpace parameter to gv_trim_zeros() --- lib/gvc/gvdevice.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) 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)); } -- 2.40.0