diff --git a/src/engine/LedgerUtils.h b/src/engine/LedgerUtils.h index c0bc3eb1bf..88d30cafe3 100644 --- a/src/engine/LedgerUtils.h +++ b/src/engine/LedgerUtils.h @@ -24,9 +24,9 @@ #ifndef __XACC_LEDGER_UTILS_H__ #define __XACC_LEDGER_UTILS_H__ -#include "gnc-common.h" #include "config.h" +#include "gnc-common.h" #include "Account.h" /** PROTOTYPES ******************************************************/ diff --git a/src/engine/Transaction.c b/src/engine/Transaction.c index 421e62f36f..476e12422d 100644 --- a/src/engine/Transaction.c +++ b/src/engine/Transaction.c @@ -585,7 +585,7 @@ xaccSplitSetBaseValue (Split *s, double value, const char * base_currency) double -xaccSplitGetBaseValue (Split *s, char * base_currency) +xaccSplitGetBaseValue (Split *s, const char * base_currency) { double value; if (!s) return 0.0; @@ -604,7 +604,7 @@ xaccSplitGetBaseValue (Split *s, char * base_currency) } } - /* be more precise -- the value depends on the curency + /* be more precise -- the value depends on the currency * we want it expressed in. */ if (!safe_strcmp(s->acc->currency, base_currency)) { @@ -613,7 +613,7 @@ xaccSplitGetBaseValue (Split *s, char * base_currency) if (!safe_strcmp(s->acc->security, base_currency)) { value = s->damount; } else - if ((0x0==base_currency) && (0 == force_double_entry)) { + if ((NULL==base_currency) && (0 == force_double_entry)) { value = s->damount * s->share_price; } else { diff --git a/src/engine/Transaction.h b/src/engine/Transaction.h index 275b6a1a40..f8d0f320c2 100644 --- a/src/engine/Transaction.h +++ b/src/engine/Transaction.h @@ -401,7 +401,7 @@ double xaccSplitGetClearedBalance (Split *); double xaccSplitGetReconciledBalance (Split *); double xaccSplitGetShareBalance (Split *); double xaccSplitGetCostBasis (Split *); -double xaccSplitGetBaseValue (Split *s, char *base_currency); +double xaccSplitGetBaseValue (Split *s, const char *base_currency); /* return the parent transaction of the split */