Skip to content

Commit e7cb0ff

Browse files
committed
Clang-format touchup
1 parent 29987c0 commit e7cb0ff

7 files changed

Lines changed: 14 additions & 23 deletions

File tree

clamd/server-th.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ int recvloop(int *socketds, unsigned nsockets, struct cl_engine *engine, unsigne
984984
if ((opt = optget(opts, "MaxRecursion"))->active) {
985985
if ((0 == opt->numarg) || (opt->numarg > CLI_MAX_MAXRECLEVEL)) {
986986
logg(LOGG_ERROR, "MaxRecursion set to %zu, but cannot be larger than %u, and cannot be 0.\n",
987-
(size_t) opt->numarg, CLI_MAX_MAXRECLEVEL);
987+
(size_t)opt->numarg, CLI_MAX_MAXRECLEVEL);
988988
cl_engine_free(engine);
989989
return 1;
990990
}

clamscan/manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,7 @@ int scanmanager(const struct optstruct *opts)
13921392
uint32_t opt_value = opt->numarg;
13931393
if ((0 == opt_value) || (opt_value > CLI_MAX_MAXRECLEVEL)) {
13941394
logg(LOGG_ERROR, "max-recursion set to %u, but cannot be larger than %u, and cannot be 0.\n",
1395-
opt_value, CLI_MAX_MAXRECLEVEL);
1395+
opt_value, CLI_MAX_MAXRECLEVEL);
13961396
ret = 2;
13971397
goto done;
13981398
}

libclamav/readdb.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ struct cli_matcher;
8181
cli_strbcasestr(ext, ".ign") || \
8282
cli_strbcasestr(ext, ".ign2") || \
8383
cli_strbcasestr(ext, ".imp"))
84-
#define CLI_DBEXT_SIGNATURE(ext) \
85-
( \
86-
cli_strbcasestr(ext, ".cvd") || \
84+
#define CLI_DBEXT_SIGNATURE(ext) \
85+
( \
86+
cli_strbcasestr(ext, ".cvd") || \
8787
cli_strbcasestr(ext, ".cld"))
8888
#else
8989
#define CLI_DBEXT(ext) \
@@ -124,9 +124,9 @@ struct cli_matcher;
124124
cli_strbcasestr(ext, ".ign") || \
125125
cli_strbcasestr(ext, ".ign2") || \
126126
cli_strbcasestr(ext, ".imp"))
127-
#define CLI_DBEXT_SIGNATURE(ext) \
128-
( \
129-
cli_strbcasestr(ext, ".cvd") || \
127+
#define CLI_DBEXT_SIGNATURE(ext) \
128+
( \
129+
cli_strbcasestr(ext, ".cvd") || \
130130
cli_strbcasestr(ext, ".cld"))
131131
#endif
132132

libclamav/scanners.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4212,9 +4212,9 @@ static inline bool result_should_goto_done(cli_ctx *ctx, cl_error_t result_in, c
42124212

42134213
cl_error_t cli_magic_scan(cli_ctx *ctx, cli_file_t type)
42144214
{
4215-
cl_error_t ret = CL_CLEAN;
4215+
cl_error_t ret = CL_CLEAN;
42164216
cl_error_t cache_check_result = CL_VIRUS;
4217-
bool cache_enabled = true;
4217+
bool cache_enabled = true;
42184218
cl_error_t verdict_at_this_level;
42194219
cli_file_t dettype = 0;
42204220
uint8_t typercg = 1;

libclamav/special.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ int cli_check_mydoom_log(cli_ctx *ctx)
7272
while (blocks) { /* This wasn't probably intended but that's what the current code does anyway */
7373
const uint32_t marker_ff = 0xffffffff;
7474

75-
if (!memcmp(&ptr[--blocks], &marker_ff, sizeof(uint32_t)))
75+
if (!memcmp(&ptr[--blocks], &marker_ff, sizeof(uint32_t)))
7676
return CL_CLEAN;
7777
}
7878

libclamav/udf.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ typedef struct __attribute__((packed)) {
6666

6767
} lb_addr;
6868

69-
7069
// Long allocation descriptor
7170
typedef struct __attribute__((packed)) {
7271
uint32_t length; // 4/14.14.1.1
@@ -211,10 +210,7 @@ static uint32_t getFileIdentifierDescriptorPaddingLength(const FileIdentifierDes
211210

212211
static inline size_t getFileIdentifierDescriptorSize(const FileIdentifierDescriptor* fid)
213212
{
214-
return FILE_IDENTIFIER_DESCRIPTOR_SIZE_KNOWN
215-
+ le16_to_host(fid->implementationLength)
216-
+ fid->fileIdentifierLength
217-
+ getFileIdentifierDescriptorPaddingLength(fid);
213+
return FILE_IDENTIFIER_DESCRIPTOR_SIZE_KNOWN + le16_to_host(fid->implementationLength) + fid->fileIdentifierLength + getFileIdentifierDescriptorPaddingLength(fid);
218214
}
219215

220216
typedef struct __attribute__((packed)) {
@@ -521,7 +517,7 @@ typedef struct __attribute__((packed)) {
521517

522518
} FileSetDescriptor;
523519

524-
typedef struct __attribute__((packed)) {
520+
typedef struct __attribute__((packed)) {
525521
uint8_t structType;
526522
char standardIdentifier[5];
527523
uint8_t structVersion;

libclamav_rust/build.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,7 @@ const BINDGEN_FUNCTIONS: &[&str] = &[
5858
];
5959

6060
// Generate bindings for these types (structs, enums):
61-
const BINDGEN_TYPES: &[&str] = &[
62-
"cli_matcher",
63-
"cli_ac_data",
64-
"cli_ac_result",
65-
"onedump_t",
66-
];
61+
const BINDGEN_TYPES: &[&str] = &["cli_matcher", "cli_ac_data", "cli_ac_result", "onedump_t"];
6762

6863
// Find the required functions and types in these headers:
6964
const BINDGEN_HEADERS: &[&str] = &[

0 commit comments

Comments
 (0)