remove some duplicated code.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14259 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2006-05-30 20:30:43 +00:00
parent 96a6c21df7
commit f71c7f04e0
2 changed files with 4 additions and 20 deletions

View File

@ -2,6 +2,8 @@
* po/es.po: Updated Spanish Translation from Eneko Lacunza * po/es.po: Updated Spanish Translation from Eneko Lacunza
* src/business/business-core/gncAddress.c: remove some duplicated code.
2006-05-30 David Hampton <hampton@employees.org> 2006-05-30 David Hampton <hampton@employees.org>
* various: Update the help file names now that the docs are xml * various: Update the help file names now that the docs are xml

View File

@ -90,26 +90,8 @@ gncAddressCreate (QofBook *book, QofEntity *prnt)
static GncAddress * static GncAddress *
qofAddressCreate (QofBook *book) qofAddressCreate (QofBook *book)
{ {
GncAddress *addr; /* The address will get set later by another function */
return gncAddressCreate(book, NULL);
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;
} }
static void static void