Skip to content

Commit 54f31a5

Browse files
cosmo0920edsiper
authored andcommitted
out_file: Clean up with using separated variable
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent b57df69 commit 54f31a5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugins/out_file/file.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ static int mkpath(struct flb_output_instance *ins, const char *dir)
378378
char parent_path[MAX_PATH];
379379
DWORD err;
380380
char *p;
381+
char *sep;
381382
#endif
382383
int ret;
383384

@@ -422,8 +423,8 @@ static int mkpath(struct flb_output_instance *ins, const char *dir)
422423
}
423424

424425
flb_plg_debug(ins, "starting to create directory %s", parent_path);
425-
p = strstr(parent_path, FLB_PATH_SEPARATOR);
426-
if (p != NULL && PathRemoveFileSpecA(parent_path)) {
426+
sep = strstr(parent_path, FLB_PATH_SEPARATOR);
427+
if (sep != NULL && PathRemoveFileSpecA(parent_path)) {
427428
flb_plg_debug(ins, "creating directory (recursive) %s", parent_path);
428429
ret = mkpath(ins, parent_path);
429430
if (ret != 0) {

0 commit comments

Comments
 (0)