[easytag/wip/buffer] Correct buffer type in C++ GIO wrapper
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/buffer] Correct buffer type in C++ GIO wrapper
- Date: Sun, 13 Apr 2014 08:10:34 +0000 (UTC)
commit fc78f9e1e14f238eeba9f729dba0cdd2cb37960a
Author: David King <amigadave amigadave com>
Date: Sun Apr 13 09:09:58 2014 +0100
Correct buffer type in C++ GIO wrapper
src/gio_wrapper.cc | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gio_wrapper.cc b/src/gio_wrapper.cc
index 569c0d5..1578d75 100644
--- a/src/gio_wrapper.cc
+++ b/src/gio_wrapper.cc
@@ -260,7 +260,7 @@ GIO_IOStream::insert (TagLib::ByteVector const &data,
GFileIOStream *tstr;
/* FIXME: Check for NULL. */
GFile *tmp = g_file_new_tmp ("easytag-XXXXXX", &tstr, NULL);
- char *buffer[4096];
+ char buffer[4096];
gsize r;
GOutputStream *ostream = g_io_stream_get_output_stream (G_IO_STREAM (tstr));
@@ -269,8 +269,8 @@ GIO_IOStream::insert (TagLib::ByteVector const &data,
seek (0);
while (g_input_stream_read_all (istream, buffer,
- MIN (sizeof (buffer), start), &r, NULL,
- &error) && r > 0)
+ MIN (sizeof (G_N_ELEMENTS (buffer)), start),
+ &r, NULL, &error) && r > 0)
{
gsize w;
g_output_stream_write_all (ostream, buffer, r, &w, NULL, &error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]