Skip to content

Commit

Permalink
fix: convert spath to string in scr_flush_file error message
Browse files Browse the repository at this point in the history
  • Loading branch information
adammoody committed Feb 9, 2022
1 parent c6eb684 commit 50f37cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scr_flush_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,11 @@ int main (int argc, char *argv[])
/* read in our flush file */
if (kvtree_read_path(file_path, hash) != KVTREE_SUCCESS) {
/* failed to read the flush file */
char* file_path_str = spath_strdup(file_path);
scr_err("%s: Failed to read flush file '%s' @ %s:%d",
PROG, file_path, __FILE__, __LINE__
);
scr_free(&file_path_str);
goto cleanup;
}

Expand Down

2 comments on commit 50f37cf

@ddai-pl
Copy link

@ddai-pl ddai-pl commented on 50f37cf Feb 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Adam,

In the scr_err function call (line# 410), "file_path" should be changed to "file_path_str".

Thanks,
Donglai

@adammoody
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes. Good eye, @ddai-pl ! I merged that too fast. I just pushed a fix for the fix.

Please sign in to comment.