Apply clang-format code style to all source files

This commit is contained in:
icex2
2019-10-20 00:50:40 +02:00
parent c600e1a423
commit c3bc8782f4
401 changed files with 13844 additions and 11361 deletions
+17 -15
View File
@@ -3,8 +3,8 @@
#include <stdio.h>
#include <stdlib.h>
#include "ezusb/util.h"
#include "ezusb/ezusb.h"
#include "ezusb/util.h"
#include "util/log.h"
@@ -35,10 +35,10 @@ static int info()
return 0;
}
static int flash(const char* fw_path)
static int flash(const char *fw_path)
{
HANDLE handle;
struct ezusb_firmware* fw;
struct ezusb_firmware *fw;
fw = ezusb_firmware_load(fw_path);
@@ -47,8 +47,8 @@ static int flash(const char* fw_path)
return -5;
}
log_misc("Loaded firmware, crc 0x%X, segments %d", fw->crc,
fw->segment_count);
log_misc(
"Loaded firmware, crc 0x%X, segments %d", fw->crc, fw->segment_count);
if (ezusb_firmware_crc(fw) != fw->crc) {
log_fatal("Firmware CRC check failed");
@@ -80,18 +80,19 @@ static int flash(const char* fw_path)
return 0;
}
static void usage(const char* argv0)
static void usage(const char *argv0)
{
printf("ezusb-tool for EZUSB hardware, e.g. IIDX C02 IO, build "
__DATE__ " " __TIME__ ", gitrev " STRINGIFY(GITREV) "\n"
"Usage: %s [cmd] ...\n"
"Available commands:\n"
" info: Get basic information (vid, pid, name) of a connected "
"device\n"
" flash: Flash a firmware binary\n", argv0);
printf("ezusb-tool for EZUSB hardware, e.g. IIDX C02 IO, build " __DATE__ " " __TIME__
", gitrev " STRINGIFY(GITREV) "\n"
"Usage: %s [cmd] ...\n"
"Available commands:\n"
" info: Get basic information (vid, pid, name) of a connected "
"device\n"
" flash: Flash a firmware binary\n",
argv0);
}
int main(int argc, char** argv)
int main(int argc, char **argv)
{
int arg_pos;
@@ -110,7 +111,8 @@ int main(int argc, char** argv)
arg_pos++;
if (arg_pos >= argc) {
printf("Usage: flash [fw_path]\n"
printf(
"Usage: flash [fw_path]\n"
" fw_path: Path to firmware binary file to flash\n");
return -1;
}