summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2017-12-13 00:29:44 -0800
committerPatrick Ohly <patrick.ohly@intel.com>2017-12-13 00:29:44 -0800
commit0951984691b422b289676b03c563c7ec22ed4e02 (patch)
treec2a8be9238f7c29a2552f55ade5c67cefdee7903
parent259d0da774d3aa740aef4bc6d23615e460630818 (diff)
datastores: fix error paths
Several error paths returned an error code when a success boolean should have been returned. Found with clang in C++11 mode. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
-rwxr-xr-xsrc/sysync/binfileimplds.cpp6
-rwxr-xr-xsrc/sysync/superdatastore.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/sysync/binfileimplds.cpp b/src/sysync/binfileimplds.cpp
index 947fa0c..e056d72 100755
--- a/src/sysync/binfileimplds.cpp
+++ b/src/sysync/binfileimplds.cpp
@@ -1932,7 +1932,7 @@ bool TBinfileImplDS::implRetrieveItemByID(
TStatusCommand &aStatusCommand
)
{
- if (!binfileDSActive()) return LOCERR_WRONGUSAGE; // must be active when called at all
+ if (!binfileDSActive()) return false; // must be active when called at all
// %%% not so nice as we need to copy it once
TSyncItem *itemP=NULL;
// read item by local ID
@@ -1966,7 +1966,7 @@ bool TBinfileImplDS::implProcessItem(
TStatusCommand &aStatusCommand
)
{
- if (!binfileDSActive()) return LOCERR_WRONGUSAGE; // must be active when called at all
+ if (!binfileDSActive()) return false; // must be active when called at all
localid_out_t newid;
TSyError statuscode;
@@ -2393,7 +2393,7 @@ localstatus TBinfileImplDS::implSaveEndOfSession(bool aUpdateAnchors)
// - end write with commit
bool TBinfileImplDS::implEndDataWrite(void)
{
- if (!binfileDSActive()) return LOCERR_WRONGUSAGE; // must be active when called at all
+ if (!binfileDSActive()) return false; // must be active when called at all
// Call apiEndDataWrite variant which is possibly implemented in
// datastores which were designed as direct derivates of binfileds.
diff --git a/src/sysync/superdatastore.h b/src/sysync/superdatastore.h
index 62a8789..deeaa44 100755
--- a/src/sysync/superdatastore.h
+++ b/src/sysync/superdatastore.h
@@ -242,7 +242,7 @@ protected:
TSmlCommandPContainer &aNextMessageCommands,
TSmlCommand * &aInterruptedCommandP,
const char *aLocalIDPrefix=NULL
- ) { return LOCERR_NOTIMP; };
+ ) { return false; };
// Client only: called to mark maps confirmed, that is, we have received ok status for them
virtual void engMarkMapConfirmed(cAppCharP aLocalID, cAppCharP aRemoteID);
#endif // SYSYNC_CLIENT
@@ -255,7 +255,7 @@ protected:
TSmlCommandPContainer &aNextMessageCommands,
TSmlCommand * &aInterruptedCommandP,
const char *aLocalIDPrefix=NULL
- ) { return LOCERR_NOTIMP; };
+ ) { return false; };
// - only dummy, creates error if called
virtual localstatus logicProcessMap(cAppCharP aRemoteID, cAppCharP aLocalID) { return false; }; // dummy, should never be called
// - called at end of request processing in server