summaryrefslogtreecommitdiff
path: root/src/cairo-output-stream.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2007-04-10 13:07:09 -0700
committerCarl Worth <cworth@cworth.org>2007-04-10 13:07:09 -0700
commitb0a256aaf3f0fd4491a28fca797aef1ef4b1251d (patch)
tree0d7be363feca3b97ebf630aad6b2f773f0ae0c91 /src/cairo-output-stream.c
parent5303980f82431a9d084177998a68527b60610241 (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.c5
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 {