diff options
author | Carl Worth <cworth@cworth.org> | 2007-04-10 13:07:09 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2007-04-10 13:07:09 -0700 |
commit | b0a256aaf3f0fd4491a28fca797aef1ef4b1251d (patch) | |
tree | 0d7be363feca3b97ebf630aad6b2f773f0ae0c91 /src/cairo-output-stream.c | |
parent | 5303980f82431a9d084177998a68527b60610241 (diff) |
Change _cairo_dtostr to have a void return type
As previously implemented, there's no essential information in the
return value from _cairo_dotostr, (the caller can simply use strlen
to recompute the same value, which is what the only caller is already
doing).
There would be real information in a return value which would return
the result from the call to snprintf for the case where the buffer is
not large enough for the number being printed.
Diffstat (limited to 'src/cairo-output-stream.c')
-rw-r--r-- | src/cairo-output-stream.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/cairo-output-stream.c b/src/cairo-output-stream.c index 960904a2..4401c5bd 100644 --- a/src/cairo-output-stream.c +++ b/src/cairo-output-stream.c @@ -215,8 +215,7 @@ _cairo_output_stream_write_hex_string (cairo_output_stream_t *stream, * has been relicensed under the LGPL/MPL dual license for inclusion * into cairo (see COPYING). -- Kristian Høgsberg <krh@redhat.com> */ - -int +void _cairo_dtostr (char *buffer, size_t size, double d) { struct lconv *locale_data; @@ -259,8 +258,6 @@ _cairo_dtostr (char *buffer, size_t size, double d) p--; } } - - return p + 1 - buffer; } enum { |