From 9c3a997a4e923ea4051bc3176e8966bcf04605a3 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Mon, 7 Jan 2002 13:56:11 +0000 Subject: [PATCH] bug fix git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@6527 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/backend/postgres/account.c | 17 +---------------- src/backend/postgres/putil.h | 2 +- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/backend/postgres/account.c b/src/backend/postgres/account.c index 75711245d0..d26029d527 100644 --- a/src/backend/postgres/account.c +++ b/src/backend/postgres/account.c @@ -272,22 +272,7 @@ get_account_cb (PGBackend *be, PGresult *result, int j, gpointer data) PINFO ("account GUID=%s", DB_GET_VAL("accountGUID",j)); - if (NULL == book) - { - GList *node; - GUID book_guid; - - FIND_BOOK (book); - - book = NULL; - for (node=be->blist; node; node=node->next) - { - book = node->data; - if (guid_equal (&book->guid, &book_guid)) break; - book = NULL; - } - if (!book) return data; - } + FIND_BOOK (book); /* Next, lets see if we've already got this account */ acct_guid = nullguid; /* just in case the read fails ... */ diff --git a/src/backend/postgres/putil.h b/src/backend/postgres/putil.h index 8518121f5b..092633cf23 100644 --- a/src/backend/postgres/putil.h +++ b/src/backend/postgres/putil.h @@ -358,7 +358,7 @@ gnc_commodity * gnc_string_to_commodity (const char *str, GNCBook *book); if (guid_equal (&book->guid, &book_guid)) break; \ book = NULL; \ } \ - if (!book) return NULL; \ + if (!book) return data; \ } \ }