Skip to content

Commit 774d183

Browse files
committed
code review changes - getcwd
1 parent 94f2da9 commit 774d183

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

cli/mfg.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2402,14 +2402,8 @@ static int sjtag_unlock(int argc, char **argv)
24022402

24032403
fwrite(debug_token.debug_token, sizeof(uint8_t), SJTAG_DEBUG_TOKEN_LEN, debug_token_bin_file);
24042404
fclose(debug_token_bin_file);
2405-
if(getcwd(dir_path, sizeof(dir_path)) == NULL)
2406-
{
2407-
printf("Error getting the current working directory. sjtag_debug_token.bin was saved in the current directory\n");
2408-
}
2409-
else
2410-
{
2411-
printf("Generated SJTAG Debug Token Path: %s/sjtag_debug_token.bin\n", dir_path);
2412-
}
2405+
getcwd(dir_path, sizeof(dir_path));
2406+
printf("Generated SJTAG Debug Token Path: %s/sjtag_debug_token.bin\n", dir_path);
24132407
}
24142408

24152409
ret = switchtec_sjtag_get_nonce(cfg.dev, &nonce);

0 commit comments

Comments
 (0)