gimp r26822 - in trunk: . tools



Author: mitch
Date: Sat Aug 30 12:15:50 2008
New Revision: 26822
URL: http://svn.gnome.org/viewvc/gimp?rev=26822&view=rev

Log:
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).



Modified:
   trunk/ChangeLog
   trunk/tools/test-clipboard.c

Modified: trunk/tools/test-clipboard.c
==============================================================================
--- trunk/tools/test-clipboard.c	(original)
+++ trunk/tools/test-clipboard.c	Sat Aug 30 12:15:50 2008
@@ -366,8 +366,7 @@
                                                            FALSE));
   if (data)
     {
-      gsize bytes;
-      gint  fd;
+      gint fd;
 
       fd = open (filename, O_WRONLY | O_CREAT | O_TRUNC, 0644);
 
@@ -378,9 +377,7 @@
           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",



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]