gnome-keyring r1484 - in trunk: . gp11



Author: nnielsen
Date: Fri Jan 30 20:42:22 2009
New Revision: 1484
URL: http://svn.gnome.org/viewvc/gnome-keyring?rev=1484&view=rev

Log:
	* gp11/gp11.h:
	* gp11/gp11-attributes.c: Use a more definite value for 
	our varargs termination. Fixes bug #569769


Modified:
   trunk/ChangeLog
   trunk/gp11/gp11-attributes.c
   trunk/gp11/gp11.h

Modified: trunk/gp11/gp11-attributes.c
==============================================================================
--- trunk/gp11/gp11-attributes.c	(original)
+++ trunk/gp11/gp11-attributes.c	Fri Jan 30 20:42:22 2009
@@ -716,7 +716,7 @@
 	attrs = gp11_attributes_new_full (allocator);
 	
 	/* No attributes */
-	if (type == (gulong)-1)
+	if (type == GP11_INVALID)
 		return attrs;
 	
 	do {
@@ -751,7 +751,7 @@
 		
 		type = va_arg (va, gulong);
 			
-	} while (type != (gulong)-1);
+	} while (type != GP11_INVALID);
 		
 	return attrs;
 }

Modified: trunk/gp11/gp11.h
==============================================================================
--- trunk/gp11/gp11.h	(original)
+++ trunk/gp11/gp11.h	Fri Jan 30 20:42:22 2009
@@ -74,11 +74,11 @@
 	GP11_DATE = -4
 };
 
-#define GP11_INVALID -1UL
+#define GP11_INVALID G_MAXULONG
 
 /* Used on varargs functions that should end with GP11_INVALID */
 #ifdef NOT_YET_SUPPORTED
-#define GP11_INVALID_TERMINATED __attribute__((__sentinel__(-1UL)))
+#define GP11_INVALID_TERMINATED __attribute__((__sentinel__(G_MAXULONG)))
 #else
 #define GP11_INVALID_TERMINATED
 #endif



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