Skip to content

Commit

Permalink
resolve ret/retval naming issue
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Sura <124262655+sebsura@users.noreply.github.com>
  • Loading branch information
2 people authored and BareosBot committed Oct 30, 2023
1 parent 0ffd8e2 commit b83de42
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/src/filed/fd_plugins.cc
Expand Up @@ -647,7 +647,6 @@ int PluginSave(JobControlRecord* jcr, FindFilesPacket* ff_pkt, bool)
{
int ret = 1; // everything ok
int len;
bRC retval;
char* cmd;
bEvent event;
PluginContext* ctx = nullptr;
Expand Down Expand Up @@ -719,8 +718,8 @@ int PluginSave(JobControlRecord* jcr, FindFilesPacket* ff_pkt, bool)
&sp.statp.st_size, &sp.statp.st_blocks, &sp);

// Get the file save parameters. I.e. the stat pkt ...
if (auto ret = PlugFunc(ctx->plugin)->startBackupFile(ctx, &sp); ret != bRC_OK) {
if (ret == bRC_Error) {
if (bRC retval = PlugFunc(ctx->plugin)->startBackupFile(ctx, &sp); retval != bRC_OK) {
if (retval == bRC_Error) {
Jmsg1(jcr, M_FATAL, 0,
_("Command plugin \"%s\": startBackupFile failed.\n"), cmd);
goto bail_out;
Expand Down

0 comments on commit b83de42

Please sign in to comment.