浏览代码

core: spell fixes

- mainly setup(n) <-> set(v) up distinction
Daniel-Constantin Mierla 4 月之前
父节点
当前提交
7dbb45a1a8

+ 1 - 1
src/core/atomic/atomic_sparc.h

@@ -42,7 +42,7 @@
 #define membar_depends() \
 	do {                 \
 	} while(0) /* really empty, not even a cc bar. */
-/* lock barrriers: empty, not needed for NOSMP; the lock/unlock should already
+/* lock barriers: empty, not needed for NOSMP; the lock/unlock should already
  * contain gcc barriers*/
 #define membar_enter_lock() \
 	do {                    \

+ 1 - 1
src/core/atomic/atomic_sparc64.h

@@ -58,7 +58,7 @@
 /*  memory barriers for lock & unlock where lock & unlock are inline asm
  *  functions that use atomic ops (and both of them use at least a store to
  *  the lock). membar_enter_lock() is at most a StoreStore|StoreLoad barrier
- *   and membar_leave_lock() is at most a LoadStore|StoreStore barries
+ *   and membar_leave_lock() is at most a LoadStore|StoreStore barriers
  *  (if the atomic ops on the specific architecture imply these barriers
  *   => these macros will be empty)
  *   Warning: these barriers don't force LoadLoad ordering between code

+ 1 - 1
src/core/atomic/atomic_x86.h

@@ -374,7 +374,7 @@ inline static long mb_atomic_get_long(volatile long *var)
 #endif /* NOSMP */
 
 
-/* on x86 atomic intructions act also as barriers */
+/* on x86 atomic instructions act also as barriers */
 #define mb_atomic_inc_int(v) atomic_inc_int(v)
 #define mb_atomic_dec_int(v) atomic_dec_int(v)
 #define mb_atomic_or_int(v, m) atomic_or_int(v, m)

+ 1 - 1
src/core/cfg/cfg.h

@@ -56,7 +56,7 @@
 typedef int (*cfg_on_change)(void *, str *, str *, void **);
 typedef void (*cfg_on_set_child)(str *, str *);
 
-/*! \brief structrure to be used by the module interface */
+/*! \brief structure to be used by the module interface */
 typedef struct _cfg_def
 {
 	char *name;

+ 1 - 1
src/core/cfg/cfg_script.c

@@ -333,7 +333,7 @@ error:
 	return -1;
 }
 
-/* destory a dynamically allocated group definition */
+/* destroy a dynamically allocated group definition */
 void cfg_script_destroy(cfg_group_t *group)
 {
 	int i;

+ 1 - 1
src/core/cfg/cfg_script.h

@@ -63,7 +63,7 @@ int cfg_set_script_var(
 /* fix-up the dynamically declared group */
 int cfg_script_fixup(cfg_group_t *group, unsigned char *block);
 
-/* destory a dynamically allocated group definition */
+/* destroy a dynamically allocated group definition */
 void cfg_script_destroy(cfg_group_t *group);
 
 #endif /* _CFG_SCRIPT_H */

+ 1 - 1
src/core/cfg/cfg_select.c

@@ -136,7 +136,7 @@ int cfg_fixup_selects()
 			*(sel->group_p) = (void *)group;
 		}
 	}
-	/* the select list is not needed anymore */
+	/* the select list is not needed any more */
 	cfg_free_selects();
 	return 0;
 }

+ 3 - 3
src/core/cfg/cfg_struct.c

@@ -296,7 +296,7 @@ static void cfg_destory_groups(unsigned char *block)
 		mapping = group->mapping;
 		def = mapping ? mapping->def : NULL;
 
-		/* destory the shmized strings in the block */
+		/* destroy the shmized strings in the block */
 		if(block && def)
 			for(i = 0; i < group->num; i++)
 				if(((CFG_VAR_TYPE(&mapping[i]) == CFG_VAR_STRING)
@@ -378,7 +378,7 @@ int sr_cfg_init(void)
 	*cfg_child_cb_last = NULL;
 
 	/* A new cfg_child_cb struct must be created with a NULL callback function.
-	 * This stucture will be the entry point for the child processes, and
+	 * This structure will be the entry point for the child processes, and
 	 * will be freed later, when none of the processes refers to it */
 	*cfg_child_cb_first = *cfg_child_cb_last =
 			cfg_child_cb_new(NULL, NULL, NULL, 0);
@@ -536,7 +536,7 @@ void cfg_child_destroy(void)
 		cfg_child_cb = cfg_child_cb->next;
 		atomic_inc(&cfg_child_cb->refcnt);
 		if(atomic_dec_and_test(&prev_cb->refcnt)) {
-			/* No more pocess refers to this callback.
+			/* No more process refers to this callback.
 			 * Did this process block the deletion,
 			 * or is there any other process that has not
 			 * reached	prev_cb yet? */

+ 8 - 8
src/core/cfg/cfg_struct.h

@@ -71,7 +71,7 @@ typedef struct _cfg_mapping
 
 	/* additional information about the cfg variable */
 	int pos; /*!< position of the variable within the group starting from 0 */
-	int offset;		   /*!< offest within the memory block */
+	int offset;		   /*!< offset within the memory block */
 	unsigned int flag; /*!< flag indicating the state of the variable */
 } cfg_mapping_t;
 
@@ -87,7 +87,7 @@ enum
 #pragma pack(push, 1)
 typedef struct _cfg_group
 {
-	cfg_mapping_t *mapping; /*!< describes the mapping betweeen
+	cfg_mapping_t *mapping; /*!< describes the mapping between
 					the cfg variable definition and the memory block */
 	char *vars;				/*!< pointer to the memory block where the values
 					are stored -- used only before the config is
@@ -126,7 +126,7 @@ typedef struct _cfg_group_inst
 {
 	unsigned int id; /*!< identifier of the group instance */
 	unsigned int set[CFG_MAX_VAR_NUM / (sizeof(int) * 8)];
-	/*!< Bitmap indicating whether or not a value is explicitely set
+	/*!< Bitmap indicating whether or not a value is explicitly set
 					within this instance. If the value is not set,
 					then the default value is used, and copied into this instance. */
 	unsigned char vars[1]; /*!< block for the values */
@@ -159,7 +159,7 @@ typedef struct _cfg_block
 /*! \brief Linked list of per-child process callbacks.
  * Each child process has a local pointer, and executes the callbacks
  * when the pointer is not pointing to the end of the list.
- * Items from the begginning of the list are deleted when the starter
+ * Items from the beginning of the list are deleted when the starter
  * pointer is moved, and no more child process uses them.
  */
 typedef struct _cfg_child_cb
@@ -211,19 +211,19 @@ extern int cfg_ginst_count;
 #define CFG_GROUP_DATA(block, group) \
 	((unsigned char *)((block)->vars + (group)->var_offset))
 
-/* Test whether a variable is explicitely set in the group instance,
+/* Test whether a variable is explicitly set in the group instance,
  * or it uses the default value */
 #define CFG_VAR_TEST(group_inst, var)        \
 	bit_test((var)->pos % (sizeof(int) * 8), \
 			(group_inst)->set + (var)->pos / (sizeof(int) * 8))
 
-/* Test whether a variable is explicitely set in the group instance,
+/* Test whether a variable is explicitly set in the group instance,
  * or it uses the default value, and set the flag. */
 #define CFG_VAR_TEST_AND_SET(group_inst, var)        \
 	bit_test_and_set((var)->pos % (sizeof(int) * 8), \
 			(group_inst)->set + (var)->pos / (sizeof(int) * 8))
 
-/* Test whether a variable is explicitely set in the group instance,
+/* Test whether a variable is explicitly set in the group instance,
  * or it uses the default value, and reset the flag. */
 #define CFG_VAR_TEST_AND_RESET(group_inst, var)        \
 	bit_test_and_reset((var)->pos % (sizeof(int) * 8), \
@@ -382,7 +382,7 @@ static inline void cfg_update_local(int no_cbs)
 		cfg_child_cb = cfg_child_cb->next;
 		atomic_inc(&cfg_child_cb->refcnt);
 		if(atomic_dec_and_test(&prev_cb->refcnt)) {
-			/* No more pocess refers to this callback.
+			/* No more process refers to this callback.
 			Did this process block the deletion,
 			or is there any other process that has not
 			reached	prev_cb yet? */

+ 1 - 1
src/core/parser/hf.c

@@ -234,7 +234,7 @@ void dump_hdr_field(struct hdr_field const *const hf)
 /**
  * free hdr parsed structure using inner free function
  * - hdr parsed struct must have as first file a free function,
- *   so it can be caseted to hf_parsed_t
+ *   so it can be cast to hf_parsed_t
  */
 void hdr_free_parsed(void **h_parsed)
 {

+ 1 - 1
src/core/parser/hf.h

@@ -266,7 +266,7 @@ void dump_hdr_field(struct hdr_field const *const hf);
 /**
  * free hdr parsed structure using inner free function
  * - hdr parsed struct must have as first file a free function,
- *   so it can be caseted to hf_parsed_t
+ *   so it can be cast to hf_parsed_t
  */
 void hdr_free_parsed(void **h_parsed);
 

+ 3 - 3
src/core/sr_module.h

@@ -154,7 +154,7 @@ void ksr_module_set_flag(unsigned int flag);
 	-127 /**< special rank, the context is the main kamailio
 							  process, but this is guaranteed to be executed
 							  before any process is forked, so it can be used
-							  to setup shared variables that depend on some
+							  to set up shared variables that depend on some
 							  after mod_init available information (e.g.
 							  total number of processes).
 							  @warning child_init(PROC_MAIN) is again called
@@ -310,7 +310,7 @@ typedef struct module_exports
 } module_exports_t;
 
 
-/** kamailio module exports version coverted for core operations */
+/** kamailio module exports version converted for core operations */
 typedef struct ksr_module_exports
 {
 	/**< null terminated module name */
@@ -347,7 +347,7 @@ typedef struct sr_module
 
 extern sr_module_t *modules;				 /**< global module list*/
 extern response_function *mod_response_cbks; /**< response callback array */
-extern int mod_response_cbk_no; /**< size of reponse callbacks array */
+extern int mod_response_cbk_no; /**< size of response callbacks array */
 
 int register_builtin_modules(void);
 int ksr_load_module(char *path, char *opts);

+ 1 - 1
src/core/udp_server.c

@@ -348,7 +348,7 @@ int probe_max_send_buffer(int udp_sock)
 #ifdef USE_MCAST
 
 /*
- * Setup multicast receiver
+ * Set up multicast receiver
  */
 static int setup_mcast_rcvr(
 		int sock, union sockaddr_union *addr, char *interface)