Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits committed May 19, 2020
1 parent 979557d commit def49ee
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
9 changes: 4 additions & 5 deletions src/chipcli/chiptool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ static int help(int argc, char ** argv)
}
}


static int usage(const char * prog_name)
{
ChipLogDetail(chipTool,
Expand Down Expand Up @@ -67,11 +66,11 @@ static int execute_command(int argc, char ** argv)
}

if (found)
{
{
ChipLogDetail(chipTool, "Executing cmd %s\n", command_to_execute->c_name);
return command_to_execute->c_func(argc, argv);
}
else
else
{
help(0, NULL);
}
Expand All @@ -87,8 +86,8 @@ int main(int argc, char ** argv)
char * prog_name = strrchr(argv[0], '/');
prog_name = prog_name ? prog_name + 1 : argv[0];
/* Do getopt stuff for global options. */
optind = 1;
optind = 1;

while ((ch = getopt(argc, argv, "h")) != -1)
{
switch (ch)
Expand Down
6 changes: 3 additions & 3 deletions src/qrcodetool/qrcodetool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static int execute_command(int argc, char ** argv)
return -1;
}
const qrcodetool_command_t * command_to_execute = NULL;
bool found = false;
bool found = false;

for (command_to_execute = commands; command_to_execute->c_name; command_to_execute++)
{
Expand Down Expand Up @@ -87,8 +87,8 @@ int main(int argc, char ** argv)
char * prog_name = strrchr(argv[0], '/');
prog_name = prog_name ? prog_name + 1 : argv[0];
/* Do getopt stuff for global options. */
optind = 1;
optind = 1;

while ((ch = getopt(argc, argv, "h")) != -1)
{
switch (ch)
Expand Down
14 changes: 7 additions & 7 deletions src/qrcodetool/qrcodetool_command_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ typedef struct qrcodetool_command_t
} qrcodetool_command_t;

qrcodetool_command_t commands[] = { { "generate-qr-code", setup_payload_operation_generate_qr_code,
" -f File path of payload.\n", "Generate qr code from payload in text file." },
" -f File path of payload.\n", "Generate qr code from payload in text file." },

{ "generate-manual-code", setup_payload_operation_generate_manual_code,
"[-f file-path]\n"
" -f File path of payload.\n",
"Generate manual code from payload in text file." },
// Last one
{} };
{ "generate-manual-code", setup_payload_operation_generate_manual_code,
"[-f file-path]\n"
" -f File path of payload.\n",
"Generate manual code from payload in text file." },
// Last one
{} };

#endif

0 comments on commit def49ee

Please sign in to comment.