From 97bbc5286520f1a5fad625b074289496605821c2 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sat, 6 May 2023 07:07:37 +0200 Subject: [PATCH] util/misc: spelling --- src/util-buffer.h | 6 +++--- src/util-checksum.c | 2 +- src/util-coredump-config.c | 7 ++++--- src/util-cpu.c | 4 ++-- src/util-daemon.c | 2 +- src/util-fmemopen.c | 4 ++-- src/util-ioctl.c | 4 ++-- src/util-ip.c | 2 +- src/util-mem.h | 2 +- src/util-print.c | 2 +- src/util-privs.c | 2 +- src/util-privs.h | 2 +- src/util-time.c | 2 +- 13 files changed, 21 insertions(+), 20 deletions(-) diff --git a/src/util-buffer.h b/src/util-buffer.h index 2371921731..3a88c8e96b 100644 --- a/src/util-buffer.h +++ b/src/util-buffer.h @@ -71,7 +71,7 @@ void MemBufferFree(MemBuffer *buffer); * onetwo|EF|three|ED|five * * \param buffer Pointer to the src MemBuffer instance to write. - * \param fp Pointer to the file file instance to write to. + * \param fp Pointer to the file instance to write to. */ #define MemBufferPrintToFP(buffer, fp) do { \ uint32_t i; \ @@ -88,7 +88,7 @@ void MemBufferFree(MemBuffer *buffer); * \brief Write a buffer to the file pointer as a printable char string. * * \param buffer Pointer to the src MemBuffer instance to write. - * \param fp Pointer to the file file instance to write to. + * \param fp Pointer to the file instance to write to. */ #define MemBufferPrintToFPAsString(mem_buffer, fp) ({ \ fwrite((mem_buffer)->buffer, sizeof(uint8_t), (mem_buffer)->offset, fp); \ @@ -98,7 +98,7 @@ void MemBufferFree(MemBuffer *buffer); * \brief Write a buffer in hex format. * * \param buffer Pointer to the src MemBuffer instance to write. - * \param fp Pointer to the file file instance to write to. + * \param fp Pointer to the file instance to write to. */ #define MemBufferPrintToFPAsHex(mem_buffer, fp) do { \ uint32_t i; \ diff --git a/src/util-checksum.c b/src/util-checksum.c index 5bbb5d4837..53a4c425b6 100644 --- a/src/util-checksum.c +++ b/src/util-checksum.c @@ -20,7 +20,7 @@ * * \author Eric Leblond * - * Util functions for checskum. + * Util functions for checksum. */ #include "suricata-common.h" diff --git a/src/util-coredump-config.c b/src/util-coredump-config.c index a131abcf83..09485cb795 100644 --- a/src/util-coredump-config.c +++ b/src/util-coredump-config.c @@ -66,7 +66,8 @@ void CoredumpEnable(void) dumpable = prctl(PR_GET_DUMPABLE, 0, 0, 0, 0); if (dumpable == -1) { SCLogNotice("Failed to get dumpable state of process, " - "core dumps may not be abled: %s", strerror(errno)); + "core dumps may not be enabled: %s", + strerror(errno)); } else if (unlimited || max_dump > 0) { /* try to enable core dump for this process */ @@ -216,7 +217,7 @@ int32_t CoredumpLoadConfig (void) } if (errno == EINVAL || errno == EPERM) { - /* could't increase the hard limit, or the soft limit exceeded the hard + /* couldn't increase the hard limit, or the soft limit exceeded the hard * limit; try to raise the soft limit to the hard limit */ if ((lim.rlim_cur < max_dump && lim.rlim_cur < lim.rlim_max) #ifdef RLIM_SAVED_CUR @@ -233,7 +234,7 @@ int32_t CoredumpLoadConfig (void) } } /* failed to set the coredump limit */ - SCLogInfo ("Could't set coredump size to %s.", dump_size_config); + SCLogInfo("Couldn't set coredump size to %s.", dump_size_config); #endif /* HAVE_SYS_RESOURCE_H */ return 0; } diff --git a/src/util-cpu.c b/src/util-cpu.c index 97546ccd3f..c73d5221e3 100644 --- a/src/util-cpu.c +++ b/src/util-cpu.c @@ -181,14 +181,14 @@ void UtilCpuPrintSummary(void) if (cpus_online > 0) SCLogInfo("CPUs/cores online: %"PRIu16, cpus_online); if (cpus_online == 0 && cpus_conf == 0) - SCLogInfo("Couldn't retireve any information of CPU's, please, send your operating " + SCLogInfo("Couldn't retrieve any information of CPU's, please, send your operating " "system info and check util-cpu.{c,h}"); } /** * Get the current number of ticks from the CPU. * - * \todo We'll have to deal with removig ticks from the extra cpuids inbetween + * \todo We'll have to deal with removing ticks from the extra cpuids in between * 2 calls. */ uint64_t UtilCpuGetTicks(void) diff --git a/src/util-daemon.c b/src/util-daemon.c index 250b6e9a24..9092189101 100644 --- a/src/util-daemon.c +++ b/src/util-daemon.c @@ -105,7 +105,7 @@ void Daemonize (void) /* Register the signal handler */ signal(SIGUSR1, SignalHandlerSigusr1); - /** \todo We should check if wie allow more than 1 instance + /** \todo We should check if we allow more than 1 instance to run simultaneously. Maybe change the behaviour through conf file */ diff --git a/src/util-fmemopen.c b/src/util-fmemopen.c index 0a20b80b23..e40cf8ff39 100644 --- a/src/util-fmemopen.c +++ b/src/util-fmemopen.c @@ -79,7 +79,7 @@ typedef struct SCFmem_ { /** * \brief Seek the mem file from offset and whence * \param handler pointer to the memfile - * \param osffset number of bytes to move from whence + * \param offset number of bytes to move from whence * \param whence SEEK_SET, SEEK_CUR, SEEK_END * \retval pos the position by the last operation, -1 if sizes are out of bounds */ @@ -144,7 +144,7 @@ static int ReadFn(void *handler, char *buf, int size) * \param handler pointer to the memfile * \param buf buffer to write in the handler * \param number of bytes to write - * \retval count , the number of bytes writen + * \retval count , the number of bytes written */ static int WriteFn(void *handler, const char *buf, int size) { diff --git a/src/util-ioctl.c b/src/util-ioctl.c index af548e24c5..4926cefde8 100644 --- a/src/util-ioctl.c +++ b/src/util-ioctl.c @@ -149,7 +149,7 @@ int GetIfaceMaxPacketSize(const char *pcap_dev) #ifdef SIOCGIFFLAGS /** * \brief Get interface flags. - * \param ifname Inteface name. + * \param ifname Interface name. * \return Interface flags or -1 on error */ int GetIfaceFlags(const char *ifname) @@ -183,7 +183,7 @@ int GetIfaceFlags(const char *ifname) #ifdef SIOCSIFFLAGS /** * \brief Set interface flags. - * \param ifname Inteface name. + * \param ifname Interface name. * \param flags Flags to set. * \return Zero on success. */ diff --git a/src/util-ip.c b/src/util-ip.c index 72c425acd3..8d482d90ed 100644 --- a/src/util-ip.c +++ b/src/util-ip.c @@ -148,7 +148,7 @@ struct in_addr *ValidateIPV4Address(const char *addr_str) /** * \brief Validates an IPV6 address and returns the network endian arranged - * version of the IPV6 addresss + * version of the IPV6 address * * \param addr Pointer to a character string containing an IPV6 address * diff --git a/src/util-mem.h b/src/util-mem.h index b84fc48256..56a7b22c78 100644 --- a/src/util-mem.h +++ b/src/util-mem.h @@ -62,7 +62,7 @@ char *SCStrndupFunc(const char *s, size_t n); /** \brief wrapper for allocing aligned mem * \param a size - * \param b alignement + * \param b alignment */ void *SCMallocAlignedFunc(const size_t size, const size_t align); #define SCMallocAligned(size, align) SCMallocAlignedFunc((size), (align)) diff --git a/src/util-print.c b/src/util-print.c index 94444a6110..1d918be3ad 100644 --- a/src/util-print.c +++ b/src/util-print.c @@ -36,7 +36,7 @@ * Prints in the format "00 AA BB" * * \param nbuf buffer into which the output is written - * \param offset of where to start writting into the buffer + * \param offset of where to start writing into the buffer * \param max_size the size of the output buffer * \param buf buffer to print from * \param buflen length of the input buffer diff --git a/src/util-privs.c b/src/util-privs.c index 386c059ce2..7e6f20bb1a 100644 --- a/src/util-privs.c +++ b/src/util-privs.c @@ -50,7 +50,7 @@ extern int sc_set_caps; extern int run_mode; /** - * \brief Drop the previliges of the main thread + * \brief Drop the privileges of the main thread */ void SCDropMainThreadCaps(uint32_t userid, uint32_t groupid) { diff --git a/src/util-privs.h b/src/util-privs.h index 739b0926eb..64518814c5 100644 --- a/src/util-privs.h +++ b/src/util-privs.h @@ -37,7 +37,7 @@ #include #include "threadvars.h" -/**Drop the previliges of the given thread tv, based on the thread cap_flags +/**Drop the privileges of the given thread tv, based on the thread cap_flags * which implies the capability requirement of the given thread. Initially all * caps are dropped and later, the required caps are set for the given thread */ diff --git a/src/util-time.c b/src/util-time.c index bedde860d4..9900f1b94b 100644 --- a/src/util-time.c +++ b/src/util-time.c @@ -310,7 +310,7 @@ static thread_local struct tm cached_local_tm[2]; * * To convert a time in seconds into year, month, day, hours, minutes * and seconds, call localtime_r(), which uses the current time zone - * to compute these values. Note, glibc's localtime_r() aquires a lock + * to compute these values. Note, glibc's localtime_r() acquires a lock * each time it is called, which limits parallelism. To call * localtime_r() less often, the values returned are cached for the * current and previous minute and then seconds are adjusted to