From 78c79c0efbffe98716130a12c5b29bb091d53bfe Mon Sep 17 00:00:00 2001 From: Peter Marschall Date: Sat, 8 Feb 2020 16:59:30 +0100 Subject: [PATCH] opensc-explorer: refactor arg_to_path() * fix indentation * fix spaces before opening curly braces --- src/tools/opensc-explorer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tools/opensc-explorer.c b/src/tools/opensc-explorer.c index 9a4dc65f..8a38d1fd 100644 --- a/src/tools/opensc-explorer.c +++ b/src/tools/opensc-explorer.c @@ -371,7 +371,8 @@ arg_to_path(const char *arg, sc_path_t *path, int is_id) } else { /* file id */ u8 cbuf[2]; - if (arg_to_fid(arg, cbuf) < 0) + + if (arg_to_fid(arg, cbuf) < 0) return -1; if ((cbuf[0] == 0x3F && cbuf[1] == 0x00) || is_id) { @@ -380,8 +381,8 @@ arg_to_path(const char *arg, sc_path_t *path, int is_id) path->type = (is_id) ? SC_PATH_TYPE_FILE_ID : SC_PATH_TYPE_PATH; } else { *path = current_path; - if (path->type == SC_PATH_TYPE_DF_NAME) { - if (path->len > sizeof(path->aid.value)) { + if (path->type == SC_PATH_TYPE_DF_NAME) { + if (path->len > sizeof(path->aid.value)) { fprintf(stderr, "Invalid length of DF_NAME path\n"); return -1; }