Skip to content

Commit

Permalink
Fix typos and remove duplicate #include
Browse files Browse the repository at this point in the history
  • Loading branch information
RainRat committed Apr 10, 2024
1 parent 8b2c81d commit 143d23c
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion INSTALL-cross-linux-arm64.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ set(CMAKE_SYSROOT /opt/aarch64-wrs-linux-sysroot)
# Note, you may need to set ENABLE_JSON_SHARED if your sysroot provides libjson-c.so instead of libjson-c.a.
#set(ENABLE_JSON_SHARED ON)
# You may need to set the following if CMake has some trouble finding the depenencies.
# You may need to set the following if CMake has some trouble finding the dependencies.
# For example if you have `libjson-c.a` in your sysroot, here: `/opt/aarch64-wrs-linux-sysroot/usr/lib64/libjson-c.a`
# then you would set:
#set(JSONC_LIBRARY "/usr/lib64/libjson-c.a")
Expand Down
1 change: 0 additions & 1 deletion clamdscan/proto.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/types.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion common/getopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int getopt_reset(void)

/* this is the plain old UNIX getopt, with GNU-style extensions. */
/* if you're porting some piece of UNIX software, this is all you need. */
/* this supports GNU-style permution and optional arguments */
/* this supports GNU-style permutation and optional arguments */

int my_getopt(int argc, char *argvc[], const char *opts)
{
Expand Down
2 changes: 1 addition & 1 deletion libclamav/asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
#define OID_1_3_6_1_4_1_311_12_1_2 "\x2b\x06\x01\x04\x01\x82\x37\x0c\x01\x02"
#define OID_szOID_CATALOG_LIST_MEMBER OID_1_3_6_1_4_1_311_12_1_2

/* CATALOG_LIST_MEMBER2 seems to be whats used by the SHA256-based CAT files */
/* CATALOG_LIST_MEMBER2 seems to be what's used by the SHA256-based CAT files */
#define OID_1_3_6_1_4_1_311_12_1_3 "\x2b\x06\x01\x04\x01\x82\x37\x0c\x01\x03"
#define OID_szOID_CATALOG_LIST_MEMBER2 OID_1_3_6_1_4_1_311_12_1_3

Expand Down
12 changes: 6 additions & 6 deletions libclamav/fmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ static inline void funmap(fmap_t *m)
* @param m The fmap.
* @param at The map offset requested.
* @param len The data length requested.
* @return const void* A pointer into to the fmap->data at the requested ofset. NULL if offset/len are not contained in the fmap.
* @return const void* A pointer into to the fmap->data at the requested offset. NULL if offset/len are not contained in the fmap.
*/
static inline const void *fmap_need_off(fmap_t *m, size_t at, size_t len)
{
Expand All @@ -190,7 +190,7 @@ static inline const void *fmap_need_off(fmap_t *m, size_t at, size_t len)
* @param m The fmap.
* @param at The map offset requested.
* @param len The data length requested.
* @return const void* A pointer into to the fmap->data at the requested ofset. NULL if offset/len are not contained in the fmap.
* @return const void* A pointer into to the fmap->data at the requested offset. NULL if offset/len are not contained in the fmap.
*/
static inline const void *fmap_need_off_once(fmap_t *m, size_t at, size_t len)
{
Expand Down Expand Up @@ -228,7 +228,7 @@ static inline size_t fmap_ptr2off(const fmap_t *m, const void *ptr)
* @param m The fmap.
* @param ptr A pointer into the fmap->data.
* @param len The data length requested.
* @return const void* A pointer into to the fmap->data at the requested ofset. NULL if offset/len are not contained in the fmap.
* @return const void* A pointer into to the fmap->data at the requested offset. NULL if offset/len are not contained in the fmap.
*/
static inline const void *fmap_need_ptr(fmap_t *m, const void *ptr, size_t len)
{
Expand All @@ -246,7 +246,7 @@ static inline const void *fmap_need_ptr(fmap_t *m, const void *ptr, size_t len)
* @param m The fmap.
* @param ptr A pointer into the fmap->data.
* @param len The data length requested.
* @return const void* A pointer into to the fmap->data at the requested ofset. NULL if offset/len are not contained in the fmap.
* @return const void* A pointer into to the fmap->data at the requested offset. NULL if offset/len are not contained in the fmap.
*/
static inline const void *fmap_need_ptr_once(fmap_t *m, const void *ptr, size_t len)
{
Expand Down Expand Up @@ -370,7 +370,7 @@ static inline const void *fmap_gets(fmap_t *m, char *dst, size_t *at, size_t max
* @param at The map offset requested.
* @param len Maximum length of data requested.
* @param[out] lenout The actual len of data available.
* @return const void* A pointer into to the fmap->data at the requested ofset. NULL if offset/len are not contained in the fmap.
* @return const void* A pointer into to the fmap->data at the requested offset. NULL if offset/len are not contained in the fmap.
*/
static inline const void *fmap_need_off_once_len(fmap_t *m, size_t at, size_t len, size_t *lenout)
{
Expand All @@ -396,7 +396,7 @@ static inline const void *fmap_need_off_once_len(fmap_t *m, size_t at, size_t le
* @param ptr A pointer into the fmap->data.
* @param len Maximum length of data requested.
* @param[out] lenout The actual len of data available.
* @return const void* A pointer into to the fmap->data at the requested ofset. NULL if offset/len are not contained in the fmap.
* @return const void* A pointer into to the fmap->data at the requested offset. NULL if offset/len are not contained in the fmap.
*/
static inline const void *fmap_need_ptr_once_len(fmap_t *m, const void *ptr, size_t len, size_t *lenout)
{
Expand Down
4 changes: 2 additions & 2 deletions libclamav/hashtab.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ const struct cli_element *cli_hashtab_insert(struct cli_hashtable *s, const char
} while (tries <= s->capacity);
/* no free place found*/
PROFILE_HASH_EXHAUSTED(s);
cli_dbgmsg("hashtab.c: Growing hashtable %p, because its full, old size: %zu.\n", (void *)s, s->capacity);
cli_dbgmsg("hashtab.c: Growing hashtable %p, because it's full, old size: %zu.\n", (void *)s, s->capacity);
} while (cli_hashtab_grow(s) >= 0);
cli_warnmsg("hashtab.c: Unable to grow hashtable\n");
return NULL;
Expand Down Expand Up @@ -529,7 +529,7 @@ cl_error_t cli_htu32_insert(struct cli_htu32 *s, const struct cli_htu32_element
} while (tries <= s->capacity);
/* no free place found*/
PROFILE_HASH_EXHAUSTED(s);
cli_dbgmsg("hashtab.c: Growing hashtable %p, because its full, old size: %zu.\n", (void *)s, s->capacity);
cli_dbgmsg("hashtab.c: Growing hashtable %p, because it's full, old size: %zu.\n", (void *)s, s->capacity);
} while ((ret = cli_htu32_grow(s, mempool)) >= 0);
cli_warnmsg("hashtab.c: Unable to grow hashtable\n");
return ret;
Expand Down
2 changes: 1 addition & 1 deletion libclamav/jsparse/js-norm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1766,7 +1766,7 @@ static int yylex(YYSTYPE *lvalp, yyscan_t scanner)
cli_dbgmsg(MODULE "infloop detected, skipping character\n");
scanner->pos++;
}
/* its not necessarily an infloop if it changed
/* it's not necessarily an infloop if it changed
* state, and it shouldn't infloop between states */
}
scanner->lastpos = scanner->pos;
Expand Down
4 changes: 2 additions & 2 deletions libclamav/pe.c
Original file line number Diff line number Diff line change
Expand Up @@ -5797,12 +5797,12 @@ cl_error_t cli_check_auth_header(cli_ctx *ctx, struct cli_exe_info *peinfo)
* If the section hashes are to be computed and returned, this function
* allocates memory for the section hashes, and it's up to the caller to free
* it. hashes->sections will be initialized to NULL at the beginning of the
* function, and if after the call it's value is non-NULL, the memory should be
* function, and if after the call its value is non-NULL, the memory should be
* freed. Furthermore, if hashes->sections is non-NULL, the hashes can assume
* to be valid regardless of the return code.
*
* Also, a few other notes:
* - If a section has a virtual size of zero, it's corresponding hash value
* - If a section has a virtual size of zero, its corresponding hash value
* will not be computed and the hash contents will be all zeroes.
* - If a section extends beyond the end of the file, the section data and
* length will be truncated, and the hash generated accordingly
Expand Down
2 changes: 1 addition & 1 deletion libclamav_rust/src/fuzzy_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ fn rgb_to_luma(rgb: &[u8]) -> u8 {

/// Convert the supplied image to grayscale. Alpha channel is discarded.
///
/// This is a customized implemententation of the grayscale feature from the `image` crate.
/// This is a customized implementation of the grayscale feature from the `image` crate.
/// This allows us to:
/// - use RGB->LUMA constants that match those used by the Python Pillow package.
/// - round the luma floating point value to the nearest integer rather than truncating.
Expand Down
2 changes: 1 addition & 1 deletion unit_tests/check_clamav.c
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,7 @@ START_TEST(test_fmap_assorted_api)
free_duplicate_fmap(dup_map);
dup_map = NULL;

/* We can close the fd-based map now that we're done with it's duplicate */
/* We can close the fd-based map now that we're done with its duplicate */
cl_fmap_close(fd_based_map);
fd_based_map = NULL;

Expand Down
2 changes: 1 addition & 1 deletion win32/compat/strptime.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static const unsigned short int __mon_yday[2][13] =
static void
day_of_the_week(struct tm *tm)
{
/* We know that January 1st 1970 was a Thursday (= 4). Compute the
/* We know that January 1st 1970 was a Thursday (= 4). Compute
the difference between this data in the one on TM and so determine
the weekday. */
int corr_year = 1900 + tm->tm_year - (tm->tm_mon < 2);
Expand Down

0 comments on commit 143d23c

Please sign in to comment.