Spelling fixes for libutil
authorBrad Hards <bradh@frogmouth.net>
Sun, 21 Feb 2010 05:58:07 +0000 (16:58 +1100)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Mon, 22 Feb 2010 20:45:35 +0000 (21:45 +0100)
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
lib/util/tests/parmlist.c
lib/util/tests/strlist.c
lib/util/util.c
lib/util/util.h
lib/util/util_strlist.c
lib/util/util_tdb.c
lib/util/util_tdb.h

index 4b1d8757152c786fb1f6a7d168607ddbc1893b3c..c1bd69d2b048e8cc2d7223a899f872d795c4f7b1 100644 (file)
@@ -59,8 +59,8 @@ static bool test_get(struct torture_context *tctx)
        torture_assert_str_equal(tctx, e->key, "bar", "key");
        torture_assert_str_equal(tctx, e->value, "mystring", "value");
 
-       e = parmlist_get(pctx, "nonexistant");
-       torture_assert(tctx, e == NULL, "nonexistant");
+       e = parmlist_get(pctx, "non-existent");
+       torture_assert(tctx, e == NULL, "non-existent");
        return true;
 }
 
@@ -87,7 +87,7 @@ static bool test_get_string_list(struct torture_context *tctx)
        torture_assert_int_equal(tctx, str_list_length(ret), 2, "length");
        torture_assert_str_equal(tctx, "true", ret[0], "ret[0]");
        torture_assert_str_equal(tctx, "false", ret[1], "ret[1]");
-       torture_assert(tctx, NULL == parmlist_get_string_list(pctx, "nonexistant", NULL), "nonexistant");
+       torture_assert(tctx, NULL == parmlist_get_string_list(pctx, "non-existent", NULL), "non-existent");
 
        return true;
 }
index 8940dab4156462a59aa0db4b3125682c29fef7e1..bf5624383c0d183cea3dcdd6aaaf1122d793a688 100644 (file)
@@ -26,7 +26,7 @@
 
 struct test_list_element {
        const char *list_as_string;
-       const char *seperators;
+       const char *separators;
        const char *list[5];
 };
 
@@ -46,7 +46,7 @@ const struct test_list_element test_lists_strings[] = {
        {
                .list_as_string = "foo bar",
                .list = { "foo bar", NULL },
-               .seperators = ";"
+               .separators = ";"
        },
        {
                .list_as_string = "\"foo bar\"",
@@ -59,7 +59,7 @@ const struct test_list_element test_lists_strings[] = {
        {
                .list_as_string = "\"foo bar\",comma;semicolon",
                .list = { "\"foo bar\",comma", "semicolon", NULL },
-               .seperators = ";"
+               .separators = ";"
        }
 };
 
@@ -79,7 +79,7 @@ const struct test_list_element test_lists_shell_strings[] = {
        {
                .list_as_string = "foo bar",
                .list = { "foo bar", NULL },
-               .seperators = ";"
+               .separators = ";"
        },
        {
                .list_as_string = "\"foo bar\"",
@@ -107,11 +107,11 @@ static bool test_lists_shell(struct torture_context *tctx, const void *data)
        bool match = true;
        TALLOC_CTX *mem_ctx = tctx;
 
-       ret1 = str_list_make_shell(mem_ctx, element->list_as_string, element->seperators);
+       ret1 = str_list_make_shell(mem_ctx, element->list_as_string, element->separators);
        
        torture_assert(tctx, ret1, "str_list_make_shell() must not return NULL");
-       tmp = str_list_join_shell(mem_ctx, (const char **) ret1, element->seperators ? *element->seperators : ' ');
-       ret2 = str_list_make_shell(mem_ctx, tmp, element->seperators);
+       tmp = str_list_join_shell(mem_ctx, (const char **) ret1, element->separators ? *element->separators : ' ');
+       ret2 = str_list_make_shell(mem_ctx, tmp, element->separators);
 
        if ((ret1 == NULL || ret2 == NULL) && ret2 != ret1) {
                match = false;
@@ -144,7 +144,7 @@ static bool test_list_make(struct torture_context *tctx, const void *data)
        const struct test_list_element *element = data;
 
        char **result;
-       result = str_list_make(tctx, element->list_as_string, element->seperators);
+       result = str_list_make(tctx, element->list_as_string, element->separators);
        torture_assert(tctx, result, "str_list_make() must not return NULL");
        torture_assert(tctx, str_list_equal((const char * const *) result,
                                            element->list),
index 25e010830ec15797e20494a880c9023e2848b4ff..0064cef8f2c74eecb8e202505aa660cba763edc5 100644 (file)
@@ -351,7 +351,7 @@ _PUBLIC_ void dump_data(int level, const uint8_t *buf, int len)
  * Write dump of binary data to the log file.
  *
  * The data is only written if the log level is at least level.
- * 16 zero bytes in a row are ommited
+ * 16 zero bytes in a row are omitted
  */
 _PUBLIC_ void dump_data_skip_zeros(int level, const uint8_t *buf, int len)
 {
index 795bd9b744db7d388d004027ce8912f85c073166..01831fc826d2ef4aa38d74e29f1c7011c0d9e749 100644 (file)
@@ -450,7 +450,7 @@ _PUBLIC_ char **str_list_make(TALLOC_CTX *mem_ctx, const char *string,
 
 /**
  * build a null terminated list of strings from an argv-like input string 
- * Entries are seperated by spaces and can be enclosed by quotes. 
+ * Entries are separated by spaces and can be enclosed by quotes.
  * Does NOT support escaping
  */
 _PUBLIC_ char **str_list_make_shell(TALLOC_CTX *mem_ctx, const char *string, const char *sep);
@@ -458,10 +458,10 @@ _PUBLIC_ char **str_list_make_shell(TALLOC_CTX *mem_ctx, const char *string, con
 /**
  * join a list back to one string 
  */
-_PUBLIC_ char *str_list_join(TALLOC_CTX *mem_ctx, const char **list, char seperator);
+_PUBLIC_ char *str_list_join(TALLOC_CTX *mem_ctx, const char **list, char separator);
 
 /** join a list back to one (shell-like) string; entries 
- * seperated by spaces, using quotes where necessary */
+ * separated by spaces, using quotes where necessary */
 _PUBLIC_ char *str_list_join_shell(TALLOC_CTX *mem_ctx, const char **list, char sep);
 
 /**
@@ -706,7 +706,7 @@ _PUBLIC_ void dump_data(int level, const uint8_t *buf,int len);
  * Write dump of binary data to the log file.
  *
  * The data is only written if the log level is at least level.
- * 16 zero bytes in a row are ommited
+ * 16 zero bytes in a row are omitted
  */
 _PUBLIC_ void dump_data_skip_zeros(int level, const uint8_t *buf, int len);
 
index af733d10ccfe41ae75677b0a29a8339ca6182b54..953862da85fab967cc53bc76bb33f091e886d208 100644 (file)
@@ -121,7 +121,7 @@ _PUBLIC_ char **str_list_make(TALLOC_CTX *mem_ctx, const char *string, const cha
 
 /**
  * build a null terminated list of strings from an argv-like input string 
- * Entries are seperated by spaces and can be enclosed by quotes. 
+ * Entries are separated by spaces and can be enclosed by quotes.
  * Does NOT support escaping
  */
 _PUBLIC_ char **str_list_make_shell(TALLOC_CTX *mem_ctx, const char *string, const char *sep)
@@ -183,7 +183,7 @@ _PUBLIC_ char **str_list_make_shell(TALLOC_CTX *mem_ctx, const char *string, con
 /**
  * join a list back to one string 
  */
-_PUBLIC_ char *str_list_join(TALLOC_CTX *mem_ctx, const char **list, char seperator)
+_PUBLIC_ char *str_list_join(TALLOC_CTX *mem_ctx, const char **list, char separator)
 {
        char *ret = NULL;
        int i;
@@ -194,14 +194,14 @@ _PUBLIC_ char *str_list_join(TALLOC_CTX *mem_ctx, const char **list, char sepera
        ret = talloc_strdup(mem_ctx, list[0]);
 
        for (i = 1; list[i]; i++) {
-               ret = talloc_asprintf_append_buffer(ret, "%c%s", seperator, list[i]);
+               ret = talloc_asprintf_append_buffer(ret, "%c%s", separator, list[i]);
        }
 
        return ret;
 }
 
 /** join a list back to one (shell-like) string; entries 
- * seperated by spaces, using quotes where necessary */
+ * separated by spaces, using quotes where necessary */
 _PUBLIC_ char *str_list_join_shell(TALLOC_CTX *mem_ctx, const char **list, char sep)
 {
        char *ret = NULL;
index 46dbf6d324e21b67730cbf16504c3576f70828f2..8973b9b1ec9ead336b91af5e7f0d0813e20c0f04 100644 (file)
@@ -133,7 +133,7 @@ int32_t tdb_fetch_int32(struct tdb_context *tdb, const char *keystr)
 }
 
 /****************************************************************************
- Store a int32_t value by an arbitary blob key, return 0 on success, -1 on failure.
+ Store a int32_t value by an arbitrary blob key, return 0 on success, -1 on failure.
  Input is int32_t in native byte order. Output in tdb is in little-endian.
 ****************************************************************************/
 
@@ -190,7 +190,7 @@ bool tdb_fetch_uint32(struct tdb_context *tdb, const char *keystr, uint32_t *val
 }
 
 /****************************************************************************
- Store a uint32_t value by an arbitary blob key, return 0 on success, -1 on failure.
+ Store a uint32_t value by an arbitrary blob key, return 0 on success, -1 on failure.
  Input is uint32_t in native byte order. Output in tdb is in little-endian.
 ****************************************************************************/
 
index 79c46714f9d1bbdb27cc041612028925e6943b55..d2f6648462af04456beed061b279ef08992fb3f1 100644 (file)
@@ -43,7 +43,7 @@ int32_t tdb_fetch_int32_byblob(struct tdb_context *tdb, TDB_DATA key);
 int32_t tdb_fetch_int32(struct tdb_context *tdb, const char *keystr);
 
 /****************************************************************************
- Store a int32_t value by an arbitary blob key, return 0 on success, -1 on failure.
+ Store a int32_t value by an arbitrary blob key, return 0 on success, -1 on failure.
  Input is int32_t in native byte order. Output in tdb is in little-endian.
 ****************************************************************************/
 int tdb_store_int32_byblob(struct tdb_context *tdb, TDB_DATA key, int32_t v);
@@ -67,7 +67,7 @@ bool tdb_fetch_uint32_byblob(struct tdb_context *tdb, TDB_DATA key, uint32_t *va
 bool tdb_fetch_uint32(struct tdb_context *tdb, const char *keystr, uint32_t *value);
 
 /****************************************************************************
- Store a uint32_t value by an arbitary blob key, return 0 on success, -1 on failure.
+ Store a uint32_t value by an arbitrary blob key, return 0 on success, -1 on failure.
  Input is uint32_t in native byte order. Output in tdb is in little-endian.
 ****************************************************************************/
 bool tdb_store_uint32_byblob(struct tdb_context *tdb, TDB_DATA key, uint32_t value);