chart: Fix format string issues in draw_tick callers.
[pspp-builds.git] / src / output / charts / plot-hist.c
index abe2908888cbb276784d402b2aa2d5e099466160..b90d57ac3cb01df951fe52e04f1381871c0b8423 100644 (file)
@@ -112,12 +112,8 @@ hist_draw_bar (struct chart *ch, const struct histogram *hist, int bar)
 
     pl_restorestate_r (ch->lp);
 
-    {
-      char buf[5];
-      snprintf (buf,5,"%g", (upper + lower) / 2.0);
-      draw_tick (ch, TICK_ABSCISSA,
-               x_pos + width / 2.0, buf);
-    }
+    draw_tick (ch, TICK_ABSCISSA,
+               x_pos + width / 2.0, "%g", (upper + lower) / 2.0);
   }
 }