diff --git a/ChangeLog b/ChangeLog index 4bfde16d8b..a2d44e0d90 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ * po/es.po: Updated Spanish Translation from Eneko Lacunza + * src/business/business-core/gncAddress.c: remove some duplicated code. + 2006-05-30 David Hampton * various: Update the help file names now that the docs are xml diff --git a/src/business/business-core/gncAddress.c b/src/business/business-core/gncAddress.c index e5ceb14ae6..2eb4014dab 100644 --- a/src/business/business-core/gncAddress.c +++ b/src/business/business-core/gncAddress.c @@ -90,26 +90,8 @@ gncAddressCreate (QofBook *book, QofEntity *prnt) static GncAddress * qofAddressCreate (QofBook *book) { - GncAddress *addr; - - if (!book) return NULL; - - addr = g_new0 (GncAddress, 1); - qof_instance_init(&addr->inst, GNC_ID_ADDRESS, book); - addr->book = book; - addr->dirty = FALSE; - addr->parent = NULL; /* set using an independent function. */ - - addr->name = CACHE_INSERT (""); - addr->addr1 = CACHE_INSERT (""); - addr->addr2 = CACHE_INSERT (""); - addr->addr3 = CACHE_INSERT (""); - addr->addr4 = CACHE_INSERT (""); - addr->phone = CACHE_INSERT (""); - addr->fax = CACHE_INSERT (""); - addr->email = CACHE_INSERT (""); - - return addr; + /* The address will get set later by another function */ + return gncAddressCreate(book, NULL); } static void