soc.2008.masterpassword: 6a644e16: Remove padding in the PurpleKeyring stru...

qulogic at pidgin.im qulogic at pidgin.im
Mon Oct 31 04:10:28 EDT 2011


----------------------------------------------------------------------
Revision: 6a644e16b8830317ffdc6d0da742f20070b10d2f
Parent:   d97bfe750e3ba1c8f52d14396f04b3ef7aa2cf69
Author:   qulogic at pidgin.im
Date:     10/31/11 02:46:29
Branch:   im.pidgin.soc.2008.masterpassword
URL: http://d.pidgin.im/viewmtn/revision/info/6a644e16b8830317ffdc6d0da742f20070b10d2f

Changelog: 

Remove padding in the PurpleKeyring structure. It's never allocated or
accessed outside of keyring.c, so this isn't necessary.

Changes against parent d97bfe750e3ba1c8f52d14396f04b3ef7aa2cf69

  patched  libpurple/keyring.c

-------------- next part --------------
============================================================
--- libpurple/keyring.c	fdd49d06e77050675e3b6a926e79e8905068036c
+++ libpurple/keyring.c	aebfc2815e2c56aea4c388abf4f69372f5585532
@@ -53,17 +53,14 @@ struct _PurpleKeyring
 
 struct _PurpleKeyring
 {
-	char * name;		/* a user friendly name	*/
-	char * id;		/* same as plugin id	*/
+	char * name;    /* a user friendly name */
+	char * id;      /* same as plugin id    */
 	PurpleKeyringRead read_password;
 	PurpleKeyringSave save_password;
 	PurpleKeyringClose close_keyring;
 	PurpleKeyringChangeMaster change_master;
 	PurpleKeyringImportPassword import_password;
 	PurpleKeyringExportPassword export_password;
-	gpointer r1;	/* RESERVED */
-	gpointer r2;	/* RESERVED */
-	gpointer r3;	/* RESERVED */
 };
 
 struct _PurpleKeyringChangeTracker
@@ -86,18 +83,17 @@ struct _PurpleKeyringCbInfo
 };
 
 /* Constructor */
-PurpleKeyring * 
-purple_keyring_new()
+PurpleKeyring *
+purple_keyring_new(void)
 {
-	return g_malloc0(sizeof(PurpleKeyring));
+	return g_new0(PurpleKeyring, 1);
 }
 
 /* Destructor */
-void 
-purple_keyring_free(PurpleKeyring * keyring)
+void
+purple_keyring_free(PurpleKeyring *keyring)
 {
 	g_free(keyring);
-	return;
 }
 
 /* Accessors */


More information about the Commits mailing list