]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
util/misc: spelling
authorVictor Julien <vjulien@oisf.net>
Sat, 6 May 2023 05:07:37 +0000 (07:07 +0200)
committerVictor Julien <vjulien@oisf.net>
Sat, 6 May 2023 12:50:43 +0000 (14:50 +0200)
13 files changed:
src/util-buffer.h
src/util-checksum.c
src/util-coredump-config.c
src/util-cpu.c
src/util-daemon.c
src/util-fmemopen.c
src/util-ioctl.c
src/util-ip.c
src/util-mem.h
src/util-print.c
src/util-privs.c
src/util-privs.h
src/util-time.c

index 237192173153932536ff0e4a7b93461ea575e2ca..3a88c8e96b82fdf089e4fceba45abf23dd48b100 100644 (file)
@@ -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;                                     \
index 5bbb5d48374848b702cc765c0cad55d64aa70698..53a4c425b693f6474d0183cba274927e4ae32d0c 100644 (file)
@@ -20,7 +20,7 @@
  *
  * \author Eric Leblond <eric@regit.org>
  *
- * Util functions for checskum.
+ * Util functions for checksum.
  */
 
 #include "suricata-common.h"
index a131abcf836c59826b92f15c303cf7912014b754..09485cb7957199292d6cdd83faeb59b5ec37f818 100644 (file)
@@ -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;
 }
index 97546ccd3f3b6ad50271b630da18581cbae5a710..c73d5221e3476a0dad86b2d1bdd7bc2dc37ec4c3 100644 (file)
@@ -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)
index 250b6e9a24104c94b93e488318f4225e3b38d2aa..909218910105e45d381e5108d06c07ec82be7185 100644 (file)
@@ -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 */
 
index 0a20b80b23226e9e706bb09b9cd7b614116db78e..e40cf8ff39c9a4b4b081f6990a23840e60505c5d 100644 (file)
@@ -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)
 {
index af548e24c502b238bd2aca60639440d018569a5c..4926cefde8e6aa322bd01097a9df4afd19828c42 100644 (file)
@@ -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.
  */
index 72c425acd3e607e1dbca1f1d4dc376144da0adce..8d482d90ed5ffb63e9bc5e9f383728f1bd43e3d4 100644 (file)
@@ -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
  *
index b84fc482561423093b1593dd299c3279888b2569..56a7b22c78f0e620d51db2c0cbc4e6e8fd32e53c 100644 (file)
@@ -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))
index 94444a61102caad8e140772ae5fc55c6641cbd4a..1d918be3adc587e60d1af8e0749a430d0e9f4256 100644 (file)
@@ -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
index 386c059ce20fd05a6e5ba292202e99af14482d7a..7e6f20bb1a7ac6c50c0736450b2bbe45d3ff43f1 100644 (file)
@@ -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)
 {
index 739b0926eb074d0186b3fb7dae5276cf379f945c..64518814c5d2cc4c9a575a64eb90f215c411391a 100644 (file)
@@ -37,7 +37,7 @@
 #include <cap-ng.h>
 #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
  */
index bedde860d49174154974bd560026986b6868078c..9900f1b94bd33b51b7ebb137b70c9b0461452152 100644 (file)
@@ -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