fix length calculation (in fact, no calculation is needed at all).

2008-08-30  Michael Natterer  <mitch@gimp.org>

	* tools/test-clipboard.c (test_clipboard_paste): fix length
	calculation (in fact, no calculation is needed at all).


svn path=/trunk/; revision=26822
This commit is contained in:
Michael Natterer 2008-08-30 12:15:50 +00:00 committed by Michael Natterer
parent a59b7683aa
commit b12a891952
2 changed files with 7 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2008-08-30 Michael Natterer <mitch@gimp.org>
* tools/test-clipboard.c (test_clipboard_paste): fix length
calculation (in fact, no calculation is needed at all).
2008-08-29 Sven Neumann <sven@gimp.org>
* authors.xml: fixed role of Aurore Derriennic.

View File

@ -366,8 +366,7 @@ test_clipboard_paste (GtkClipboard *clipboard,
FALSE));
if (data)
{
gsize bytes;
gint fd;
gint fd;
fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC, 0644);
@ -378,9 +377,7 @@ test_clipboard_paste (GtkClipboard *clipboard,
return FALSE;
}
bytes = data->length * data->format / 8;
if (write (fd, data->data, bytes) < bytes)
if (write (fd, data->data, data->length) < data->length)
{
close (fd);
g_printerr ("%s: write() failed: %s",