Skip to content

Commit

Permalink
Set return type of Volume::save() to boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
shermp committed Apr 28, 2024
1 parent 159e4a5 commit 4720efd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ndb/NDBMetadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ Result NDBMetadata::setMetadata(QString const& cID, QVariantMap md) {
NDB_ASSERT(TypeError, validType, "Unexpected type for key %s", key.toUtf8().constData());
symbols.Volume__setAttribute(v, key, val);
}
int res = symbols.Volume__save(v, device);
bool res = symbols.Volume__save(v, device);
NDB_ASSERT(MetadataError, res, "error saving metadata for id %s", cID.toUtf8().constData());
NDB_DEBUG("Volume__save returned with val %d", res);
NDB_DEBUG("Volume__save returned with val '%s'", res ? "true" : "false");
return Ok;
}

Expand Down
2 changes: 1 addition & 1 deletion src/ndb/NDBMetadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class NDBMetadata : public QObject {
void (*VolumeManager__forEach)(QString const& dbName, std::function<void(Volume /*const&*/ *v)> f);
bool (*Volume__isValid)(Volume* _this);
QVariantMap (*Volume__getDbValues)(Volume* volume);
int (*Volume__save)(Volume* _this, Device* device);
bool (*Volume__save)(Volume* _this, Device* device);
void (*Volume__setAttribute)(Volume* _this, QString const& key, QVariant const& val);
} symbols;

Expand Down

0 comments on commit 4720efd

Please sign in to comment.