]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib:util: Fix code spelling
authorAndreas Schneider <asn@samba.org>
Thu, 13 Apr 2023 11:29:32 +0000 (13:29 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 14 Apr 2023 05:25:33 +0000 (05:25 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
23 files changed:
lib/util/access.c
lib/util/byteorder.h
lib/util/charset/charset_macosxfs.c
lib/util/charset/codepoints.c
lib/util/charset/iconv.c
lib/util/charset/pull_push.c
lib/util/charset/tests/convert_string.c
lib/util/charset/util_unistr.c
lib/util/debug.h
lib/util/memcache.h
lib/util/modules.c
lib/util/ms_fnmatch.c
lib/util/params.c
lib/util/rfc1738.c
lib/util/samba_util.h
lib/util/smb_strtox.c
lib/util/string_wrappers.h
lib/util/tests/asn1_tests.c
lib/util/tests/rfc1738.c
lib/util/tfork.c
lib/util/tfork.h
lib/util/time.c
lib/util/util.c

index f4b5ae79125c231dcb14f94c8f7e50d9ef68ea7e..fd9912db873d1a406210427fa7c6139ebbb9f6f9 100644 (file)
@@ -309,7 +309,7 @@ static bool allow_access_internal(const char **deny_list,
                return true;
        }
 
-       /* if theres no deny list and no allow list then allow access */
+       /* if there's no deny list and no allow list then allow access */
        if ((!deny_list || *deny_list == 0) &&
            (!allow_list || *allow_list == 0)) {
                return true;
@@ -321,7 +321,7 @@ static bool allow_access_internal(const char **deny_list,
                return(list_match(allow_list,client,client_match));
        }
 
-       /* if theres a deny list but no allow list then allow
+       /* if there's a deny list but no allow list then allow
           all hosts not on the deny list */
        if (!allow_list || *allow_list == 0) {
                return(!list_match(deny_list,client,client_match));
index 036cd6d1eb2a9ec52598597791f9a0dab3f78d60..26268ac93cd4ec4aab5c2facfa03e534ee3ea22a 100644 (file)
@@ -55,7 +55,7 @@ then to extract a uint16_t value at offset 25 in a buffer you do this:
 char *buffer = foo_bar();
 uint16_t xx = SVAL(buffer,25);
 
-We are using the byteoder independence of the ANSI C bitshifts to do
+We are using the byteorder independence of the ANSI C bitshifts to do
 the work. A good optimising compiler should turn this into efficient
 code, especially if it happens to have the right byteorder :-)
 
index 75dbb4bad8738c095a74d85c23cea751d8468afe..2ecfdff74f93ae2fbd11339728ea6f05155510ae 100644 (file)
@@ -1,18 +1,18 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
    Samba charset module for Mac OS X/Darwin
    Copyright (C) Benjamin Riefenstahl 2003
-   
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -247,7 +247,7 @@ size_t macosxfs_encoding_pull(
        } else {
                /*
                 * We would like to use a fixed buffer and a loop
-                * here, but than we can't garantee that the input is
+                * here, but then we can't guarantee that the input is
                 * well-formed UTF-8, as we are supposed to do.
                 */
                static char *buffer = NULL;
@@ -304,7 +304,7 @@ size_t macosxfs_encoding_pull(
         * Add a converted null byte, if the CFString conversions
         * prevented that until now.
         */
-       if (0 == (*inbuf)[*inbytesleft-1] && 
+       if (0 == (*inbuf)[*inbytesleft-1] &&
            (0 != (*outbuf)[outsize*2-1] || 0 != (*outbuf)[outsize*2-2])) {
 
                if ((outsize*2+2) > *outbytesleft) {
@@ -383,7 +383,7 @@ size_t macosxfs_encoding_push(
 
        if (0 == charsconverted) {
                debug_out("String conversion: "
-                         "Buffer too small or not convertable\n");
+                         "Buffer too small or not convertible\n");
                hexdump("UTF16LE->UTF8 (old) input",
                        *inbuf, *inbytesleft);
                errno = EILSEQ; /* Probably more likely. */
@@ -595,7 +595,7 @@ static size_t macosxfs_encoding_push(
 #endif /* USE_INTERNAL_API */
 
 #else /* DARWIN */
-     
+
 void charset_macosfs_dummy(void);
 void charset_macosfs_dummy(void)
 {
index c35241e298331550f47f4076b478cdce8a1d84f9..c39ed4a8436d3ac8cc62f178ef149b61bd7447b1 100644 (file)
@@ -16664,7 +16664,7 @@ smb_iconv_t get_conv_handle(struct smb_iconv_handle *ic,
 /**
  * Return the unicode codepoint for the next character in the input
  * string in the given src_charset.
- * The unicode codepoint (codepoint_t) is an unsinged 32 bit value.
+ * The unicode codepoint (codepoint_t) is an unsigned 32 bit value.
  *
  * Also return the number of bytes consumed (which tells the caller
  * how many bytes to skip to get to the next src_charset-character).
index 43b3306b0deb6f2f9328ca8687d836c727039065..30e705ee119f5bc45a298b323f3fd0086bb21547 100644 (file)
@@ -213,7 +213,7 @@ static size_t sys_uconv(void *cd,
 
        /*
         * The following transliteration function takes two parameters, the
-        * lenght of the text to be converted (converted_len) and a limit which
+        * length of the text to be converted (converted_len) and a limit which
         * may be smaller then converted_len. We just set limit to converted_len
         * and also ignore the value returned in limit.
         */
@@ -272,7 +272,7 @@ static size_t sys_uconv(void *cd,
 #endif
 
 /**
- * This is a simple portable iconv() implementaion.
+ * This is a simple portable iconv() implementation.
  *
  * It only knows about a very small number of character sets - just
  * enough that Samba works on systems that don't have iconv.
index 1a79e6aa400d58ed2f77b44734b24cc51233f1a2..c5ab2ac85c0372e84d8523c6ebf394817e385576 100644 (file)
@@ -64,7 +64,7 @@ bool push_ucs2_talloc(TALLOC_CTX *ctx, smb_ucs2_t **dest, const char *src,
  * The destination string should be free'd using talloc_free() if no longer
  * needed.
  *
- * @return True on succcess, false otherwise.
+ * @return True on success, false otherwise.
  */
 bool push_utf8_talloc(TALLOC_CTX *ctx, char **dest, const char *src,
                      size_t *converted_size)
index e99a2965a0553de65e93868ebdc7aa8dd0ed3295..3c15cdc1d040020a3e9531ce94fcdae3e59e4c7c 100644 (file)
@@ -1,19 +1,19 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
    test suite for the charcnv functions
 
    Copyright (C) Andrew Bartlett 2011
-   
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -34,7 +34,7 @@ struct torture_suite *torture_local_string_case(TALLOC_CTX *mem_ctx);
  * http://en.wikipedia.org/w/index.php?title=Ancient_Greek&oldid=421361065#Example_text
  */
 
-const char *plato_english_ascii = 
+const char *plato_english_ascii =
        "What you, men of Athens, have learned from my accusers, I do not"
        " know: but I, for my part, nearly forgot who I was thanks to them since"
        " they spoke so persuasively. And yet, of the truth, they have spoken,"
@@ -51,7 +51,7 @@ const char *plato_english_utf16le_base64 =
        "AGsAZQBuACwAIABvAG4AZQAgAG0AaQBnAGgAdAAgAHMAYQB5ACwAIABuAG8AdABoAGkAbgBnACAA"
        "YQB0ACAAYQBsAGwALgA=";
 
-static const char *plato_utf8_base64 = 
+static const char *plato_utf8_base64 =
        "4b2Nz4TOuSDOvOG9ss69IOG9kc68zrXhv5bPgiwg4b2mIOG8hM69zrTPgc61z4IgzobOuM63zr3O"
        "seG/ls6/zrksIM+AzrXPgM+Mzr3OuM6xz4TOtSDhvZHPgOG9uCDPhOG/ts69IOG8kM684b+2zr0g"
        "zrrOsc+EzrfOs8+Mz4HPic69LCDOv+G9kM66IM6/4by2zrTOsTog4byQzrPhvbwgzrQnIM6/4b2W"
@@ -61,7 +61,7 @@ static const char *plato_utf8_base64 =
        "4b2hz4Ig4byUz4DOv8+CIM614bywz4DOteG/ls69IM6/4b2QzrThvbLOvSDOteG8sM+Bzq7Ous6x"
        "z4POuc69Lg==";
 
-static const char *plato_utf16le_base64 = 
+static const char *plato_utf16le_base64 =
        "TR/EA7kDIAC8A3IfvQMgAFEfvAO1A9YfwgMsACAAZh8gAAQfvQO0A8EDtQPCAyAAhgO4A7cDvQOx"
        "A9YfvwO5AywAIADAA7UDwAPMA70DuAOxA8QDtQMgAFEfwAN4HyAAxAP2H70DIAAQH7wD9h+9AyAA"
        "ugOxA8QDtwOzA8wDwQPJA70DLAAgAL8DUB+6AyAAvwM2H7QDsQM6ACAAEB+zA3wfIAC0AycAIAC/"
@@ -71,14 +71,14 @@ static const char *plato_utf16le_base64 =
        "swO1AyAAYR/CAyAAFB/AA78DwgMgALUDMB/AA7UD1h+9AyAAvwNQH7QDch+9AyAAtQMwH8EDrgO6"
        "A7EDwwO5A70DLgA=";
 
-static const char *plato_latin_utf8_base64 = 
+static const char *plato_latin_utf8_base64 =
        "SMOzdGkgbcOobiBodW1lw65zLCDDtCDDoW5kcmVzIEF0aMSTbmHDrm9pLCBwZXDDs250aGF0ZSBo"
        "dXDDsiB0w7RuIGVtw7RuIGthdMSTZ8OzcsWNbiwgb3VrIG/DrmRhOiBlZ+G5kSBkJyBvw7tuIGth"
        "w6wgYXV0w7JzIGh1cCcgYXV0xY1uIG9sw61nb3UgZW1hdXRvw7sgZXBlbGF0aMOzbcSTbiwgaG/D"
        "unTFjSBwaXRoYW7DtHMgw6lsZWdvbi4gS2HDrXRvaSBhbMSTdGjDqXMgZ2UgaMWNcyDDqXBvcyBl"
        "aXBlw65uIG91ZMOobiBlaXLhuJdrYXNpbi4=";
 
-static const char *plato_latin_utf16le_base64 = 
+static const char *plato_latin_utf16le_base64 =
        "SADzAHQAaQAgAG0A6ABuACAAaAB1AG0AZQDuAHMALAAgAPQAIADhAG4AZAByAGUAcwAgAEEAdABo"
        "ABMBbgBhAO4AbwBpACwAIABwAGUAcADzAG4AdABoAGEAdABlACAAaAB1AHAA8gAgAHQA9ABuACAA"
        "ZQBtAPQAbgAgAGsAYQB0ABMBZwDzAHIATQFuACwAIABvAHUAawAgAG8A7gBkAGEAOgAgAGUAZwBR"
@@ -161,7 +161,7 @@ static bool test_gd_iso8859_cp850_handle(struct torture_context *tctx)
        DATA_BLOB gd_utf16le = base64_decode_data_blob(gd_utf16le_base64);
        DATA_BLOB gd_output;
        DATA_BLOB gd_output2;
-       
+
        talloc_steal(tctx, gd_utf8.data);
        talloc_steal(tctx, gd_cp850.data);
        talloc_steal(tctx, gd_iso8859_1.data);
@@ -170,14 +170,14 @@ static bool test_gd_iso8859_cp850_handle(struct torture_context *tctx)
        iconv_handle = get_iconv_testing_handle(tctx, "ISO-8859-1", "CP850",
                                                lpcfg_parm_bool(tctx->lp_ctx, NULL, "iconv", "use_builtin_handlers", true));
        torture_assert(tctx, iconv_handle, "getting iconv handle");
-               
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF8, CH_DOS, 
-                                                   gd_utf8.data, gd_utf8.length, 
-                                                   (void *)&gd_output.data, &gd_output.length), 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF8, CH_DOS,
+                                                   gd_utf8.data, gd_utf8.length,
+                                                   (void *)&gd_output.data, &gd_output.length),
                       "conversion from UTF8 to (dos charset) ISO-8859-1");
        torture_assert_data_blob_equal(tctx, gd_output, gd_iso8859_1, "conversion from UTF8 to (dos charset) ISO-8859-1 incorrect");
-       
+
        torture_assert(tctx, convert_string_error_handle(iconv_handle,
                                                         CH_UTF8, CH_DOS,
                                                         gd_utf8.data, gd_utf8.length,
@@ -254,73 +254,73 @@ static bool test_gd_iso8859_cp850_handle(struct torture_context *tctx)
        torture_assert_errno_equal(tctx, EINVAL, "conversion from short UTF16 to UTF8 should fail EINVAL");
        torture_assert_int_equal(tctx, gd_output.length, 1, "Should only get 1 char of output");
 
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF8, CH_UNIX, 
-                                                   gd_utf8.data, gd_utf8.length, 
-                                                   (void *)&gd_output.data, &gd_output.length), 
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF8, CH_UNIX,
+                                                   gd_utf8.data, gd_utf8.length,
+                                                   (void *)&gd_output.data, &gd_output.length),
                       "conversion from UTF8 to (unix charset) CP850");
        torture_assert_data_blob_equal(tctx, gd_output, gd_cp850, "conversion from UTF8 to (unix charset) CP850 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF8, CH_UTF8, 
-                                                   gd_utf8.data, gd_utf8.length, 
-                                                   (void *)&gd_output.data, &gd_output.length), 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF8, CH_UTF8,
+                                                   gd_utf8.data, gd_utf8.length,
+                                                   (void *)&gd_output.data, &gd_output.length),
                       "conversion from UTF8 to UTF8");
        torture_assert_data_blob_equal(tctx, gd_output, gd_utf8, "conversion from UTF8 to UTF8 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF16LE, CH_DOS, 
-                                                   gd_utf16le.data, gd_utf16le.length, 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF16LE, CH_DOS,
+                                                   gd_utf16le.data, gd_utf16le.length,
                                                    (void *)&gd_output.data, &gd_output.length),
                       "conversion from UTF16LE to (dos charset) ISO-8859-1");
        torture_assert_data_blob_equal(tctx, gd_output, gd_iso8859_1, "conversion from UTF16LE to (dos charset) ISO-8859-1 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_DOS, CH_UTF16LE, 
-                                                   gd_output.data, gd_output.length, 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_DOS, CH_UTF16LE,
+                                                   gd_output.data, gd_output.length,
                                                    (void *)&gd_output2.data, &gd_output2.length),
                       "round trip conversion from (dos charset) ISO-8859-1 back to UTF16LE");
        torture_assert_data_blob_equal(tctx, gd_output2, gd_utf16le,  "round trip conversion from (dos charset) ISO-8859-1 back to UTF16LE");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF16LE, CH_UNIX, 
-                                                   gd_utf16le.data, gd_utf16le.length, 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF16LE, CH_UNIX,
+                                                   gd_utf16le.data, gd_utf16le.length,
                                                    (void *)&gd_output.data, &gd_output.length),
                       "conversion from UTF16LE to (unix charset) CP850");
        torture_assert_data_blob_equal(tctx, gd_output, gd_cp850, "conversion from UTF16LE to (unix charset) CP850 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF16LE, CH_UTF8, 
-                                                   gd_utf16le.data, gd_utf16le.length, 
-                                                   (void *)&gd_output.data, &gd_output.length), 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF16LE, CH_UTF8,
+                                                   gd_utf16le.data, gd_utf16le.length,
+                                                   (void *)&gd_output.data, &gd_output.length),
                       "conversion from UTF16LE to UTF8");
        torture_assert_data_blob_equal(tctx, gd_output, gd_utf8, "conversion from UTF16LE to UTF8 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_DOS, CH_DOS, 
-                                                   gd_iso8859_1.data, gd_iso8859_1.length, 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_DOS, CH_DOS,
+                                                   gd_iso8859_1.data, gd_iso8859_1.length,
                                                    (void *)&gd_output.data, &gd_output.length),
                       "conversion from (dos charset) ISO-8859-1 to (dos charset) ISO-8859-1");
        torture_assert_data_blob_equal(tctx, gd_output, gd_iso8859_1, "conversion from UTF16LE to (dos charset) ISO-8859-1 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_DOS, CH_UNIX, 
-                                                   gd_iso8859_1.data, gd_iso8859_1.length, 
-                                                   (void *)&gd_output.data, &gd_output.length), 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_DOS, CH_UNIX,
+                                                   gd_iso8859_1.data, gd_iso8859_1.length,
+                                                   (void *)&gd_output.data, &gd_output.length),
                       "conversion from (dos charset) ISO-8859-1 to (unix charset) CP850");
        torture_assert_data_blob_equal(tctx, gd_output, gd_cp850, "conversion from UTF16LE to (unix charset) CP850 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_DOS, CH_UTF8, 
-                                                   gd_iso8859_1.data, gd_iso8859_1.length, 
-                                                   (void *)&gd_output.data, &gd_output.length), 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_DOS, CH_UTF8,
+                                                   gd_iso8859_1.data, gd_iso8859_1.length,
+                                                   (void *)&gd_output.data, &gd_output.length),
                       "conversion from (dos charset) ISO-8859-1 to UTF8");
        torture_assert_data_blob_equal(tctx, gd_output, gd_utf8, "conversion from UTF16LE to UTF8 incorrect");
 
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_DOS, CH_UTF16LE, 
-                                                   gd_iso8859_1.data, gd_iso8859_1.length, 
-                                                   (void *)&gd_output.data, &gd_output.length), 
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_DOS, CH_UTF16LE,
+                                                   gd_iso8859_1.data, gd_iso8859_1.length,
+                                                   (void *)&gd_output.data, &gd_output.length),
                       "conversion from (dos charset) ISO-8859-1 to UTF16LE");
        torture_assert_data_blob_equal(tctx, gd_output, gd_utf16le, "conversion from (dos charset) ISO-8859-1 to UTF16LE");
        torture_assert_int_equal(tctx,
@@ -355,12 +355,12 @@ static bool test_gd_minus_1_handle(struct torture_context *tctx)
        DATA_BLOB gd_utf8_terminated;
        DATA_BLOB gd_cp850_terminated;
        DATA_BLOB gd_utf16le_terminated;
-       
+
        talloc_steal(tctx, gd_utf8.data);
        talloc_steal(tctx, gd_cp850.data);
        talloc_steal(tctx, gd_utf16le.data);
 
-       iconv_handle = get_iconv_testing_handle(tctx, "CP850", "CP850", 
+       iconv_handle = get_iconv_testing_handle(tctx, "CP850", "CP850",
                                                lpcfg_parm_bool(tctx->lp_ctx, NULL, "iconv", "use_builtin_handlers", true));
        torture_assert(tctx, iconv_handle, "getting iconv handle");
 
@@ -502,11 +502,11 @@ static bool test_gd_minus_1_handle(struct torture_context *tctx)
                                                         (void *)gd_output.data, gd_output.length, &gd_output.length),
                       "conversion from UTF16LE to UTF8 null terminated");
        torture_assert_data_blob_equal(tctx, gd_output, gd_cp850_terminated, "conversion from UTF16LE to UTF8 null terminated early");
-       
+
        /* Now null terminate the string particularly early, the confirm we don't skip the NULL and convert any further */
        gd_utf8_terminated.data[1] = '\0';
        gd_utf8_terminated.length = 2; /* used for the comparison only */
-       
+
        gd_utf16le_terminated.data[2] = '\0';
        gd_utf16le_terminated.data[3] = '\0';
        gd_utf16le_terminated.length = 4; /* used for the comparison only */
@@ -545,7 +545,7 @@ static bool test_gd_ascii_handle(struct torture_context *tctx)
        talloc_steal(tctx, gd_iso8859_1.data);
        talloc_steal(tctx, gd_utf16le.data);
 
-       iconv_handle = get_iconv_testing_handle(tctx, "ASCII", "UTF8", 
+       iconv_handle = get_iconv_testing_handle(tctx, "ASCII", "UTF8",
                                                lpcfg_parm_bool(tctx->lp_ctx, NULL, "iconv", "use_builtin_handlers", true));
        torture_assert(tctx, iconv_handle, "getting iconv handle");
 
@@ -586,7 +586,7 @@ static bool test_gd_ascii_handle(struct torture_context *tctx)
                                                         gd_utf8.data, gd_utf8.length,
                                                         (void *)gd_output.data, gd_output.length,
                                                         &gd_output.length) == false,
-                      "conversion from UTF8 to (dos charset) ASCII should fail due to too illigal seqence");
+                      "conversion from UTF8 to (dos charset) ASCII should fail due to illegal sequence");
        torture_assert_errno_equal(tctx, EILSEQ, "conversion from UTF8 to (dos charset) ISO-8859-1 should fail EILSEQ");
        torture_assert_int_equal(tctx, gd_output.length, 1, "Should only get 2 char of output");
 
@@ -612,49 +612,49 @@ static bool test_plato_english_iso8859_cp850_handle(struct torture_context *tctx
        DATA_BLOB plato_english_utf16le = base64_decode_data_blob(plato_english_utf16le_base64);
        DATA_BLOB plato_english_output;
        DATA_BLOB plato_english_output2;
-       
+
        talloc_steal(tctx, plato_english_utf16le.data);
 
-       iconv_handle = get_iconv_testing_handle(tctx, "ISO-8859-1", "CP850", 
+       iconv_handle = get_iconv_testing_handle(tctx, "ISO-8859-1", "CP850",
                                                lpcfg_parm_bool(tctx->lp_ctx, NULL, "iconv", "use_builtin_handlers", true));
        torture_assert(tctx, iconv_handle, "getting iconv handle");
-               
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF8, CH_DOS, 
-                                                   plato_english_utf8.data, plato_english_utf8.length, 
-                                                   (void *)&plato_english_output.data, &plato_english_output.length), 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF8, CH_DOS,
+                                                   plato_english_utf8.data, plato_english_utf8.length,
+                                                   (void *)&plato_english_output.data, &plato_english_output.length),
                       "conversion from UTF8 to (dos charset) ISO-8859-1");
        torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_iso8859_1, "conversion from UTF8 to (dos charset) ISO-8859-1 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF8, CH_UNIX, 
-                                                   plato_english_utf8.data, plato_english_utf8.length, 
-                                                   (void *)&plato_english_output.data, &plato_english_output.length), 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF8, CH_UNIX,
+                                                   plato_english_utf8.data, plato_english_utf8.length,
+                                                   (void *)&plato_english_output.data, &plato_english_output.length),
                       "conversion from UTF8 to (unix charset) CP850");
        torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_cp850, "conversion from UTF8 to (unix charset) CP850 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF8, CH_UTF8, 
-                                                   plato_english_utf8.data, plato_english_utf8.length, 
-                                                   (void *)&plato_english_output.data, &plato_english_output.length), 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF8, CH_UTF8,
+                                                   plato_english_utf8.data, plato_english_utf8.length,
+                                                   (void *)&plato_english_output.data, &plato_english_output.length),
                       "conversion from UTF8 to UTF8");
        torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_utf8, "conversion from UTF8 to UTF8 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF16LE, CH_DOS, 
-                                                   plato_english_utf16le.data, plato_english_utf16le.length, 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF16LE, CH_DOS,
+                                                   plato_english_utf16le.data, plato_english_utf16le.length,
                                                    (void *)&plato_english_output.data, &plato_english_output.length),
                       "conversion from UTF16LE to (dos charset) ISO-8859-1");
        torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_iso8859_1, "conversion from UTF16LE to (dos charset) ISO-8859-1 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_DOS, CH_UTF16LE, 
-                                                   plato_english_output.data, plato_english_output.length, 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_DOS, CH_UTF16LE,
+                                                   plato_english_output.data, plato_english_output.length,
                                                    (void *)&plato_english_output2.data, &plato_english_output2.length),
                       "round trip conversion from (dos charset) ISO-8859-1 back to UTF16LE");
        torture_assert_data_blob_equal(tctx, plato_english_output2, plato_english_utf16le,  "round trip conversion from (dos charset) ISO-8859-1 back to UTF16LE");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
                                                    CH_UTF16LE, CH_UTF8,
                                                    plato_english_utf16le.data, plato_english_utf16le.length,
                                                    (void *)&plato_english_output.data, &plato_english_output.length),
@@ -680,44 +680,44 @@ static bool test_plato_english_iso8859_cp850_handle(struct torture_context *tctx
        torture_assert_int_equal(tctx, plato_english_output.length, 5, "short conversion failed");
 
        torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
-                                                   CH_UTF16LE, CH_UNIX, 
-                                                   plato_english_utf16le.data, plato_english_utf16le.length, 
+                                                   CH_UTF16LE, CH_UNIX,
+                                                   plato_english_utf16le.data, plato_english_utf16le.length,
                                                    (void *)&plato_english_output.data, &plato_english_output.length),
                       "conversion from UTF16LE to (unix charset) CP850");
        torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_cp850, "conversion from UTF16LE to (unix charset) CP850 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF16LE, CH_UTF8, 
-                                                   plato_english_utf16le.data, plato_english_utf16le.length, 
-                                                   (void *)&plato_english_output.data, &plato_english_output.length), 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF16LE, CH_UTF8,
+                                                   plato_english_utf16le.data, plato_english_utf16le.length,
+                                                   (void *)&plato_english_output.data, &plato_english_output.length),
                       "conversion from UTF16LE to UTF8");
        torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_utf8, "conversion from UTF16LE to UTF8 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_DOS, CH_DOS, 
-                                                   plato_english_iso8859_1.data, plato_english_iso8859_1.length, 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_DOS, CH_DOS,
+                                                   plato_english_iso8859_1.data, plato_english_iso8859_1.length,
                                                    (void *)&plato_english_output.data, &plato_english_output.length),
                       "conversion from (dos charset) ISO-8859-1 to (dos charset) ISO-8859-1");
        torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_iso8859_1, "conversion from UTF16LE to (dos charset) ISO-8859-1 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_DOS, CH_UNIX, 
-                                                   plato_english_iso8859_1.data, plato_english_iso8859_1.length, 
-                                                   (void *)&plato_english_output.data, &plato_english_output.length), 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_DOS, CH_UNIX,
+                                                   plato_english_iso8859_1.data, plato_english_iso8859_1.length,
+                                                   (void *)&plato_english_output.data, &plato_english_output.length),
                       "conversion from (dos charset) ISO-8859-1 to (unix charset) CP850");
        torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_cp850, "conversion from UTF16LE to (unix charset) CP850 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_DOS, CH_UTF8, 
-                                                   plato_english_iso8859_1.data, plato_english_iso8859_1.length, 
-                                                   (void *)&plato_english_output.data, &plato_english_output.length), 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_DOS, CH_UTF8,
+                                                   plato_english_iso8859_1.data, plato_english_iso8859_1.length,
+                                                   (void *)&plato_english_output.data, &plato_english_output.length),
                       "conversion from (dos charset) ISO-8859-1 to UTF8");
        torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_utf8, "conversion from UTF16LE to UTF8 incorrect");
 
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_DOS, CH_UTF16LE, 
-                                                   plato_english_iso8859_1.data, plato_english_iso8859_1.length, 
-                                                   (void *)&plato_english_output.data, &plato_english_output.length), 
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_DOS, CH_UTF16LE,
+                                                   plato_english_iso8859_1.data, plato_english_iso8859_1.length,
+                                                   (void *)&plato_english_output.data, &plato_english_output.length),
                       "conversion from (dos charset) ISO-8859-1 to UTF16LE");
        torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_utf16le, "conversion from (dos charset) ISO-8859-1 to UTF16LE");
        return true;
@@ -731,10 +731,10 @@ static bool test_plato_english_minus_1_handle(struct torture_context *tctx)
        DATA_BLOB plato_english_output;
        DATA_BLOB plato_english_utf8_terminated;
        DATA_BLOB plato_english_utf16le_terminated;
-       
+
        talloc_steal(tctx, plato_english_utf16le.data);
 
-       iconv_handle = get_iconv_testing_handle(tctx, "ISO-8859-1", "CP850", 
+       iconv_handle = get_iconv_testing_handle(tctx, "ISO-8859-1", "CP850",
                                                lpcfg_parm_bool(tctx->lp_ctx, NULL, "iconv", "use_builtin_handlers", true));
        torture_assert(tctx, iconv_handle, "getting iconv handle");
 
@@ -746,7 +746,7 @@ static bool test_plato_english_minus_1_handle(struct torture_context *tctx)
        memcpy(plato_english_utf16le_terminated.data, plato_english_utf16le.data, plato_english_utf16le.length);
        plato_english_utf16le_terminated.data[plato_english_utf16le.length] = '\0';
        plato_english_utf16le_terminated.data[plato_english_utf16le.length + 1] = '\0';
-               
+
        plato_english_output = data_blob_talloc(tctx, NULL, plato_english_utf16le.length + 10);
 
        torture_assert(tctx, convert_string_error_handle(iconv_handle,
@@ -835,11 +835,11 @@ static bool test_plato_english_minus_1_handle(struct torture_context *tctx)
                       "conversion from UTF16LE to UTF8 null terminated");
        torture_assert_data_blob_equal(tctx, plato_english_output, plato_english_utf8_terminated, "conversion from UTF16LE to UTF8 null terminated early");
 
-       
+
        /* Now null terminate the string particularly early, the confirm we don't skip the NULL and convert any further */
        plato_english_utf8_terminated.data[1] = '\0';
        plato_english_utf8_terminated.length = 2; /* used for the comparison only */
-       
+
        plato_english_utf16le_terminated.data[2] = '\0';
        plato_english_utf16le_terminated.data[3] = '\0';
        plato_english_utf16le_terminated.length = 4; /* used for the comparison only */
@@ -872,7 +872,7 @@ static bool test_plato_minus_1_handle(struct torture_context *tctx)
        DATA_BLOB plato_output;
        DATA_BLOB plato_utf8_terminated;
        DATA_BLOB plato_utf16le_terminated;
-       
+
        talloc_steal(tctx, plato_utf8.data);
        talloc_steal(tctx, plato_utf16le.data);
 
@@ -976,7 +976,7 @@ static bool test_plato_minus_1_handle(struct torture_context *tctx)
                                                         (void *)plato_output.data, plato_output.length, &plato_output.length),
                       "conversion from UTF16LE to UTF8 null terminated");
        torture_assert_data_blob_equal(tctx, plato_output, plato_utf8_terminated, "conversion from UTF16LE to UTF8 null terminated early");
-       
+
        return true;
 }
 
@@ -987,15 +987,15 @@ static bool test_plato_cp850_utf8_handle(struct torture_context *tctx)
        DATA_BLOB plato_utf16le = base64_decode_data_blob(plato_utf16le_base64);
        DATA_BLOB plato_output;
        DATA_BLOB plato_output2;
-       
+
        talloc_steal(tctx, plato_utf8.data);
        talloc_steal(tctx, plato_utf16le.data);
 
-       iconv_handle = get_iconv_testing_handle(tctx, "CP850", "UTF8", 
+       iconv_handle = get_iconv_testing_handle(tctx, "CP850", "UTF8",
                                                lpcfg_parm_bool(tctx->lp_ctx, NULL, "iconv", "use_builtin_handlers", true));
        torture_assert(tctx, iconv_handle, "creating iconv handle");
-               
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
                                                    CH_UTF8, CH_UTF16LE,
                                                    plato_utf8.data, plato_utf8.length,
                                                    (void *)&plato_output.data, &plato_output.length),
@@ -1055,18 +1055,18 @@ static bool test_plato_cp850_utf8_handle(struct torture_context *tctx)
                       "conversion of UTF8 to UTF8");
 
        torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
-                                                   CH_UTF8, CH_DOS, 
-                                                   plato_utf8.data, plato_utf8.length, 
-                                                   (void *)&plato_output.data, &plato_output.length) == false, 
+                                                   CH_UTF8, CH_DOS,
+                                                   plato_utf8.data, plato_utf8.length,
+                                                   (void *)&plato_output.data, &plato_output.length) == false,
                       "conversion of UTF8 ancient greek to DOS charset CP850 should fail");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF8, CH_UNIX, 
-                                                   plato_utf8.data, plato_utf8.length, 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF8, CH_UNIX,
+                                                   plato_utf8.data, plato_utf8.length,
                                                    (void *)&plato_output.data, &plato_output.length),
                       "conversion of UTF16 ancient greek to unix charset UTF8 failed");
        torture_assert_data_blob_equal(tctx, plato_output, plato_utf8, "conversion from UTF8 to (unix charset) UTF8 incorrect");
-       
+
        memset(plato_output.data, '\0', plato_output.length);
        torture_assert(tctx, convert_string_error_handle(iconv_handle,
                                                         CH_UTF8, CH_UNIX,
@@ -1076,17 +1076,17 @@ static bool test_plato_cp850_utf8_handle(struct torture_context *tctx)
                       "conversion of UTF16 ancient greek to unix charset UTF8 failed");
        torture_assert_data_blob_equal(tctx, plato_output, plato_utf8, "conversion from UTF8 to (unix charset) UTF8 incorrect");
 
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF8, CH_UTF8, 
-                                                   plato_utf8.data, plato_utf8.length, 
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF8, CH_UTF8,
+                                                   plato_utf8.data, plato_utf8.length,
                                                    (void *)&plato_output.data, &plato_output.length),
                       "conversion of UTF16 ancient greek to unix charset UTF8 failed");
        torture_assert_data_blob_equal(tctx, plato_output, plato_utf8, "conversion from UTF8 to UTF8 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF16LE, CH_DOS, 
-                                                   plato_utf16le.data, plato_utf16le.length, 
-                                                   (void *)&plato_output.data, &plato_output.length) == false,         
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF16LE, CH_DOS,
+                                                   plato_utf16le.data, plato_utf16le.length,
+                                                   (void *)&plato_output.data, &plato_output.length) == false,
                       "conversion of UTF16 ancient greek to DOS charset CP850 should fail");
 
        /* Allocate enough space, if it were possible do do the conversion */
@@ -1123,10 +1123,10 @@ static bool test_plato_cp850_utf8_handle(struct torture_context *tctx)
                                 "conversion of UTF16 ancient greek to UTF8 should stop on multibyte boundary");
 
 
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF16LE, CH_UNIX, 
-                                                   plato_utf16le.data, plato_utf16le.length, 
-                                                   (void *)&plato_output.data, &plato_output.length),  
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF16LE, CH_UNIX,
+                                                   plato_utf16le.data, plato_utf16le.length,
+                                                   (void *)&plato_output.data, &plato_output.length),
                       "conversion of UTF16 ancient greek to unix charset UTF8 failed");
        torture_assert_data_blob_equal(tctx, plato_output, plato_utf8, "conversion from UTF16LE to (unix charset) UTF8 incorrect");
        torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
@@ -1135,16 +1135,16 @@ static bool test_plato_cp850_utf8_handle(struct torture_context *tctx)
                                                    (void *)&plato_output.data, &plato_output.length),
                       "conversion of UTF16 ancient greek to UTF8 failed");
        torture_assert_data_blob_equal(tctx, plato_output, plato_utf8, "conversion from UTF16LE to UTF8 incorrect");
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                         CH_UTF16LE, CH_UTF8, 
-                                                         plato_utf16le.data, plato_utf16le.length, 
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                         CH_UTF16LE, CH_UTF8,
+                                                         plato_utf16le.data, plato_utf16le.length,
                                                          (void *)&plato_output.data, &plato_output.length),
                       "conversion of UTF16 ancient greek to UTF8 failed");
        torture_assert_data_blob_equal(tctx, plato_output, plato_utf8, "conversion from UTF16LE to UTF8 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                         CH_UTF8, CH_UTF16LE, 
-                                                         plato_output.data, plato_output.length, 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                         CH_UTF8, CH_UTF16LE,
+                                                         plato_output.data, plato_output.length,
                                                          (void *)&plato_output2.data, &plato_output2.length),
                       "round trip conversion of UTF16 ancient greek to UTF8 and back again failed");
        torture_assert_data_blob_equal(tctx, plato_output2, plato_utf16le,
@@ -1179,57 +1179,57 @@ static bool test_plato_latin_cp850_utf8_handle(struct torture_context *tctx)
        DATA_BLOB plato_latin_utf16le = base64_decode_data_blob(plato_latin_utf16le_base64);
        DATA_BLOB plato_latin_output;
        DATA_BLOB plato_latin_output2;
-       
+
        talloc_steal(tctx, plato_latin_utf8.data);
        talloc_steal(tctx, plato_latin_utf16le.data);
 
        iconv_handle = get_iconv_testing_handle(tctx, "CP850", "UTF8",
                                                lpcfg_parm_bool(tctx->lp_ctx, NULL, "iconv", "use_builtin_handlers", true));
        torture_assert(tctx, iconv_handle, "creating iconv handle");
-               
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF8, CH_DOS, 
-                                                   plato_latin_utf8.data, plato_latin_utf8.length, 
-                                                   (void *)&plato_latin_output.data, &plato_latin_output.length) == false, 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF8, CH_DOS,
+                                                   plato_latin_utf8.data, plato_latin_utf8.length,
+                                                   (void *)&plato_latin_output.data, &plato_latin_output.length) == false,
                       "conversion of UTF8  latin charset greek to DOS charset CP850 should fail");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF8, CH_UNIX, 
-                                                   plato_latin_utf8.data, plato_latin_utf8.length, 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF8, CH_UNIX,
+                                                   plato_latin_utf8.data, plato_latin_utf8.length,
                                                    (void *)&plato_latin_output.data, &plato_latin_output.length),
                       "conversion of UTF16 latin charset greek to unix charset UTF8 failed");
        torture_assert_data_blob_equal(tctx, plato_latin_output, plato_latin_utf8, "conversion from UTF8 to (unix charset) UTF8 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF8, CH_UTF8, 
-                                                   plato_latin_utf8.data, plato_latin_utf8.length, 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF8, CH_UTF8,
+                                                   plato_latin_utf8.data, plato_latin_utf8.length,
                                                    (void *)&plato_latin_output.data, &plato_latin_output.length),
                       "conversion of UTF16 latin charset greek to unix charset UTF8 failed");
        torture_assert_data_blob_equal(tctx, plato_latin_output, plato_latin_utf8, "conversion from UTF8 to UTF8 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF16LE, CH_DOS, 
-                                                   plato_latin_utf16le.data, plato_latin_utf16le.length, 
-                                                   (void *)&plato_latin_output.data, &plato_latin_output.length) == false,     
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF16LE, CH_DOS,
+                                                   plato_latin_utf16le.data, plato_latin_utf16le.length,
+                                                   (void *)&plato_latin_output.data, &plato_latin_output.length) == false,
                       "conversion of UTF16 latin charset greek to DOS charset CP850 should fail");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                   CH_UTF16LE, CH_UNIX, 
-                                                   plato_latin_utf16le.data, plato_latin_utf16le.length, 
-                                                   (void *)&plato_latin_output.data, &plato_latin_output.length),      
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                   CH_UTF16LE, CH_UNIX,
+                                                   plato_latin_utf16le.data, plato_latin_utf16le.length,
+                                                   (void *)&plato_latin_output.data, &plato_latin_output.length),
                       "conversion of UTF16 latin charset greek to unix charset UTF8 failed");
        torture_assert_data_blob_equal(tctx, plato_latin_output, plato_latin_utf8, "conversion from UTF16LE to (unix charset) CP850 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                         CH_UTF16LE, CH_UTF8, 
-                                                         plato_latin_utf16le.data, plato_latin_utf16le.length, 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                         CH_UTF16LE, CH_UTF8,
+                                                         plato_latin_utf16le.data, plato_latin_utf16le.length,
                                                          (void *)&plato_latin_output.data, &plato_latin_output.length),
                       "conversion of UTF16 latin charset greek to UTF8 failed");
        torture_assert_data_blob_equal(tctx, plato_latin_output, plato_latin_utf8, "conversion from UTF16LE to UTF8 incorrect");
-       
-       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle, 
-                                                         CH_UTF8, CH_UTF16LE, 
-                                                         plato_latin_output.data, plato_latin_output.length, 
+
+       torture_assert(tctx, convert_string_talloc_handle(tctx, iconv_handle,
+                                                         CH_UTF8, CH_UTF16LE,
+                                                         plato_latin_output.data, plato_latin_output.length,
                                                          (void *)&plato_latin_output2.data, &plato_latin_output2.length),
                       "round trip conversion of UTF16 latin charset greek to UTF8 and back again failed");
        torture_assert_data_blob_equal(tctx, plato_latin_output2, plato_latin_utf16le,
index 4658d91b0c83496f591f0744244e34a9df9cd713..f8cadf28507f08b93b7ab7222c970a884c7a42d4 100644 (file)
@@ -313,7 +313,7 @@ static ssize_t pull_ascii_string(char *dest, const void *src, size_t dest_len, s
  * </dl>
  *
  * @param dest_len is the maximum length allowed in the
- * destination. If dest_len is -1 then no maxiumum is used.
+ * destination. If dest_len is -1 then no maximum is used.
  **/
 static ssize_t push_ucs2(void *dest, const char *src, size_t dest_len, int flags)
 {
@@ -409,7 +409,7 @@ static size_t pull_ucs2(char *dest, const void *src, size_t dest_len, size_t src
   STR_ASCII     use ascii even with unicode packet.
   STR_NOALIGN   means don't do alignment.
  dest_len is the maximum length allowed in the destination. If dest_len
- is -1 then no maxiumum is used.
+ is -1 then no maximum is used.
 **/
 
 _PUBLIC_ ssize_t push_string(void *dest, const char *src, size_t dest_len, int flags)
index 4e5ce3da035f3b1346a5ddbeaa2ad9294df8876e..335a644718f55b8bdac9ad71dce66b3e1f7ae733 100644 (file)
@@ -50,7 +50,7 @@ bool dbgsetclass(int level, int cls);
 
 /*
  * Define all new debug classes here. A class is represented by an entry in
- * the DEBUGLEVEL_CLASS array. Index zero of this arrray is equivalent to the
+ * the DEBUGLEVEL_CLASS array. Index zero of this array is equivalent to the
  * old DEBUGLEVEL. Any source file that does NOT add the following lines:
  *
  *   #undef  DBGC_CLASS
@@ -113,7 +113,7 @@ bool dbgsetclass(int level, int cls);
  *
  * DEBUGLVL()
  *   If the 'file specific' debug class level >= level OR the system-wide
- *   DEBUGLEVEL (synomym for DEBUGLEVEL_CLASS[ DBGC_ALL ]) >= level then
+ *   DEBUGLEVEL (synonym for DEBUGLEVEL_CLASS[ DBGC_ALL ]) >= level then
  *   generate a header using the default macros for file, line, and
  *   function name. Returns True if the debug level was <= DEBUGLEVEL.
  *
@@ -121,7 +121,7 @@ bool dbgsetclass(int level, int cls);
  *
  * DEBUG()
  *   If the 'file specific' debug class level >= level OR the system-wide
- *   DEBUGLEVEL (synomym for DEBUGLEVEL_CLASS[ DBGC_ALL ]) >= level then
+ *   DEBUGLEVEL (synonym for DEBUGLEVEL_CLASS[ DBGC_ALL ]) >= level then
  *   generate a header using the default macros for file, line, and
  *   function name. Each call to DEBUG() generates a new header *unless* the
  *   previous debug output was unterminated (i.e. no '\n').
@@ -131,7 +131,7 @@ bool dbgsetclass(int level, int cls);
  *
  * DEBUGC()
  *   If the 'macro specified' debug class level >= level OR the system-wide
- *   DEBUGLEVEL (synomym for DEBUGLEVEL_CLASS[ DBGC_ALL ]) >= level then
+ *   DEBUGLEVEL (synonym for DEBUGLEVEL_CLASS[ DBGC_ALL ]) >= level then
  *   generate a header using the default macros for file, line, and
  *   function name. Each call to DEBUG() generates a new header *unless* the
  *   previous debug output was unterminated (i.e. no '\n').
index 1e13e33419100623b6f950f3baeccf5a126546ae..803af813025cee7c4b7b766c3c76ca9e8af7db57 100644 (file)
@@ -73,7 +73,7 @@ void memcache_add(struct memcache *cache, enum memcache_number n,
 
 /*
  * Add a talloc object to the cache. The difference to memcache_add() is that
- * when the objects is to be discared, talloc_free is called for it. Also
+ * when the objects is to be discarded, talloc_free is called for it. Also
  * talloc_move() ownership of the object to the cache.
  *
  * Please note that the current implementation has a fixed relationship
index 5d49ed95df03c0ed61a036de8e47cce091dff351..4260234b00708158dfba9baed1039416c55fc5bb 100644 (file)
@@ -257,7 +257,7 @@ done:
  *
  * @param[in]  subsystem  The name of the subsystem the module belongs too.
  *
- * @param[in]  module     Load a module using an abolute path.
+ * @param[in]  module     Load a module using an absolute path.
  *
  * @return  A NTSTATUS code
  */
index 90aab13ec909d14449e9611ce1005e740d318fbe..48454a8eccee4fa1bfaa64276b6598a37b2daf9e 100644 (file)
@@ -19,7 +19,7 @@
 
 /*
    This module was originally based on fnmatch.c copyright by the Free
-   Software Foundation. It bears little (if any) resemblence to that
+   Software Foundation. It bears little (if any) resemblance to that
    code now
 */
 
index 79b45ee2fcbc63062c93626ed74930c2bb702218..dac77825af88a2fc31ab38936951b9f20784d906 100644 (file)
@@ -64,7 +64,7 @@
  *  beginning with either a semicolon (';') or a pound sign ('#').
  *
  *  All whitespace in section names and parameter names is compressed
- *  to single spaces.  Leading and trailing whitespace is stipped from
+ *  to single spaces.  Leading and trailing whitespace is stripped from
  *  both names and values.
  *
  *  Only the first equals sign in a parameter line is significant.
index 82395446bc8978a3240cad72860bbab831c11aef..7b8db11fda3344ecb48417965362a9938485f59d 100644 (file)
@@ -60,7 +60,7 @@
  * and whatever is not in either of those are what RFC 1738 called "unsafe",
  * meaning that they should are canonically but not mandatorily escaped.
  *
- * Characters below 0x20 or above 0x7E are always enocded.
+ * Characters below 0x20 or above 0x7E are always encoded.
  */
 
 static const unsigned char escapees[127] = {
index 95470a066a3321ad3011fd22b2d526c03de4f72a..e672b4b00b21f3f581d3248b42e0649f92a0289c 100644 (file)
@@ -118,7 +118,7 @@ _PUBLIC_ uint64_t generate_random_u64_range(uint64_t lower, uint64_t upper);
  * This is much lighter than generate_random_u64() and it's
  * designed for performance critical code paths.
  *
- * @veto_value It is garanteed that the return value if different from
+ * @veto_value It is guaranteed that the return value is different from
  *             the veto_value.
  *
  * @return a unique value per given state and process
@@ -158,7 +158,7 @@ _PUBLIC_ char *generate_random_password(TALLOC_CTX *mem_ctx, size_t min, size_t
  *
  * If 'unix charset' is 'utf8' (the default) then
  * each utf16 character is a random value from 0x0000
- * 0xFFFF (exluding the surrogate ranges from 0xD800-0xDFFF)
+ * 0xFFFF (excluding the surrogate ranges from 0xD800-0xDFFF)
  * while the translation from CH_UTF16MUNGED
  * to CH_UTF8 replaces invalid values (see utf16_munged_pull()).
  *
@@ -273,7 +273,7 @@ _PUBLIC_ char *rfc1738_unescape(char *buf);
 _PUBLIC_ char *rfc1738_escape_part(TALLOC_CTX *mem_ctx, const char *url);
 
 /**
-  varient of strcmp() that handles NULL ptrs
+  variant of strcmp() that handles NULL ptrs
 **/
 _PUBLIC_ int strcmp_safe(const char *s1, const char *s2);
 
@@ -321,7 +321,7 @@ _PUBLIC_ bool conv_str_u64(const char * str, uint64_t * val);
  *
  * @param[in]  s2  The second memory region to compare.
  *
- * @param[in]  n   The length of the memory to comapre.
+ * @param[in]  n   The length of the memory to compare.
  *
  * @return true when the memory regions are equal, false if not.
  */
index e57316e29b5d2d0541e9e45520fe0ffe89c5c917..7a477dc8aaae714e01e152ec954e78ad9044bc86 100644 (file)
@@ -30,7 +30,7 @@
  * @param nptr         pointer to string which is to be converted
  * @param endptr       [optional] reference to remainder of the string
  * @param base         base of the numbering scheme
- * @param err          error occured during conversion
+ * @param err          error occurred during conversion
  * @flags              controlling conversion feature
  * @result             result of the conversion as provided by strtoul
  *
@@ -106,7 +106,7 @@ out:
  * @param nptr         pointer to string which is to be converted
  * @param endptr       [optional] reference to remainder of the string
  * @param base         base of the numbering scheme
- * @param err          error occured during conversion
+ * @param err          error occurred during conversion
  * @flags              controlling conversion feature
  * @result             result of the conversion as provided by strtoull
  *
index 00bce079fbf9abad5e8ec68f12703022177e1b5d..7625cd076ea1957547e80d873a7c44d06500ea34 100644 (file)
@@ -54,7 +54,7 @@ do { \
 #ifdef HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS
 
 /* We need a number of different prototypes for our
-   non-existent fuctions */
+   non-existent functions */
 char * __unsafe_string_function_usage_here__(void);
 
 size_t __unsafe_string_function_usage_here_size_t__(void);
index ab5262c4ffb510e0c992d681d71f71ac050b3345..f2bd163c428591f78b11718876a8c9bb0bb7bc88 100644 (file)
@@ -75,7 +75,7 @@ static const char *oid_data_err[] = {
                "2..5.4.130",   /* second sub-identifier is empty */
                "2.5..4.130",   /* third sub-identifier is empty */
                "2.abc.4.130",  /* invalid sub-identifier */
-               "2.5abc.4.130", /* invalid sub-identifier (alpha-numeric)*/
+               "2.5abc.4.130", /* invalid sub-identifier (alphanumeric)*/
 };
 
 /* Data for successful Partial OIDs conversions */
index 6e960377964b1cb5c8a49658db6ee0bf4e5b439f..4f7eced9499db3125c3c0d462191c8ffa9593a32 100644 (file)
@@ -16,7 +16,7 @@
    and its supposedly escaped equivalent.
 
    The first part of the flag name indicates the direction of transformation;
-   tyhe second part is the expected result. For example, ESCAPE_EQ means the
+   the second part is the expected result. For example, ESCAPE_EQ means the
    escape is expected to succeed and result is expected to be equal to the
    given answer. ESCAPE_EQ_CASECMP is only equal when compared
    case-insensitively. UNESCAPE_ERR means unescaping the escaped string should
index e3eaa199db535af31106a9dc417b5de9039030fe..316287b1284633583f0683e2869e7510275d9452 100644 (file)
@@ -103,7 +103,7 @@ struct tfork_state {
 
 /*
  * A global state that synchronizes access to handling SIGCHLD and waiting for
- * childs.
+ * children.
  */
 struct tfork_signal_state {
        bool available;
@@ -677,7 +677,7 @@ static pid_t tfork_start_waiter_and_worker(struct tfork_state *state,
                        _exit(errno);
                }
                /*
-                * The caller exitted and didn't call tfork_status().
+                * The caller exited and didn't call tfork_status().
                 */
                _exit(0);
        }
@@ -699,7 +699,7 @@ static pid_t tfork_start_waiter_and_worker(struct tfork_state *state,
         * Wait for our parent (the process that called tfork_create()) to
         * close() the socketpair fd in tfork_status().
         *
-        * Again, the caller might have exitted without calling tfork_status().
+        * Again, the caller might have exited without calling tfork_status().
         */
        nread = sys_read(status_sp_waiter_fd, &c, 1);
        if (nread == -1) {
index 7b2ecd1eb896a8d78c6825f661ea48f54bfdc5ce..6c59caf56c540acba0c91cc5e1b1b7aa474db35c 100644 (file)
@@ -46,7 +46,7 @@ struct tfork;
  * @note There's one thing this thing can't protect us against and that is if a
  * process installs a SIGCHLD handler from one thread while another thread is
  * running inside tfork_create() or tfork_status() and the signal handler
- * doesn't forward signals for exitted childs it didn't fork, ie our childs.
+ * doesn't forward signals for exited children it didn't fork, ie our children.
  **/
 struct tfork *tfork_create(void);
 
index 773fd611a33c052d70262c3967b2930280db6cc9..c2a77d664d37a21107134cf81950d4389d2ebbda 100644 (file)
@@ -1166,7 +1166,7 @@ struct timespec nt_time_to_full_timespec(NTTIME nt)
  * Note: this function uses the full time_t range as valid date values including
  * (time_t)0 and -1. That means that struct timespec sentinel values (cf
  * is_omit_timespec()) can't be converted to sentinel values in a time_t
- * representation. Callers should therefor check the NTTIME value with
+ * representation. Callers should therefore check the NTTIME value with
  * null_nttime() before calling this function.
  **/
 time_t full_timespec_to_time_t(const struct timespec *_ts)
@@ -1204,7 +1204,7 @@ time_t full_timespec_to_time_t(const struct timespec *_ts)
  * Note: this function uses the full time_t range as valid date values including
  * (time_t)0 and -1. That means that NTTIME sentinel values of 0 and -1 which
  * represent a "not-set" value, can't be converted to sentinel values in a
- * time_t representation. Callers should therefor check the NTTIME value with
+ * time_t representation. Callers should therefore check the NTTIME value with
  * null_nttime() before calling this function.
  **/
 time_t nt_time_to_full_time_t(NTTIME nt)
index faa4218d19ffdffcb156778c081e323bbddae7da..b35ba115a7aa69a9d56f034508be2fd96757592b 100644 (file)
@@ -1086,7 +1086,7 @@ _PUBLIC_ char *hex_encode_talloc(TALLOC_CTX *mem_ctx, const unsigned char *buff_
 }
 
 /**
-  varient of strcmp() that handles NULL ptrs
+  variant of strcmp() that handles NULL ptrs
 **/
 _PUBLIC_ int strcmp_safe(const char *s1, const char *s2)
 {