Skip to content

Commit

Permalink
Fix styling - Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and Bhaskar-Sarma committed May 20, 2020
1 parent 979557d commit 1a38fce
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
11 changes: 10 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ MAYBE_PLATFORM_SUBDIRS += \
$(NULL)
endif # CONFIG_DEVICE_LAYER

MAYBE_QRCODE_TOOL = \
$(NULL)

if CHIP_TARGET_STYLE_UNIX
MAYBE_QRCODE_TOOL += \
qrcodetool \
$(NULL)
endif

# Always package (e.g. for 'make dist') these subdirectories.

DIST_SUBDIRS = \
Expand Down Expand Up @@ -79,7 +88,7 @@ SUBDIRS = \
setup_payload \
crypto \
$(MAYBE_PLATFORM_SUBDIRS) \
qrcodetool \
$(MAYBE_QRCODE_TOOL) \
$(NULL)

if CHIP_BUILD_TESTS
Expand Down
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 1a38fce

Please sign in to comment.