]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
librpc:ndr: Fix code spelling
authorAndreas Schneider <asn@samba.org>
Tue, 6 Jun 2023 10:59:25 +0000 (12:59 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 23 Jun 2023 13:44:31 +0000 (13:44 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
librpc/ndr/ndr.c
librpc/ndr/ndr_backupkey.c
librpc/ndr/ndr_compression.c
librpc/ndr/ndr_string.c
librpc/ndr/ndr_table.c

index 25765880d8be52c92e948dc59032de7d507ef00b..44cf524867d3e54566f0891be13632213b9d1d33 100644 (file)
@@ -43,7 +43,7 @@
  * malicious packet.
  *
  * In an ideal world this would be controlled by range() restrictions
- * on array sizes and careful IDL construction to avoid arbitary
+ * on array sizes and careful IDL construction to avoid arbitrary
  * linked lists, but this is a backstop for now.
  */
 #define NDR_TOKEN_MAX_LIST_SIZE 65535
@@ -169,7 +169,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_pop(struct ndr_pull *ndr)
 
        /*
         * we need to keep up to 7 bytes
-        * in order to get the aligment right.
+        * in order to get the alignment right.
         */
        skip = ndr->offset & 0xFFFFFFF8;
 
index adb6e3932874a5ee81c92656c58b32c3912ec999..635c9fa370023a154a4ee6c2069ec5054404cc02 100644 (file)
@@ -134,7 +134,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_bkrp_access_check_v2(struct ndr_push *ndr, i
                NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->nonce, r->nonce_len));
                NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->sid));
                /* We articially increment the offset of 20 bytes (size of hash
-                * comming after the pad) so that ndr_align can determine easily
+                * coming after the pad) so that ndr_align can determine easily
                 * the correct pad size to make the whole struct 8 bytes aligned
                 */
                ofs = ndr->offset + 20;
@@ -185,7 +185,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_bkrp_access_check_v3(struct ndr_push *ndr, i
                NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->nonce, r->nonce_len));
                NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->sid));
                /* We articially increment the offset of 64 bytes (size of hash
-                * comming after the pad) so that ndr_align can determine easily
+                * coming after the pad) so that ndr_align can determine easily
                 * the correct pad size to make the whole struct 16 bytes aligned
                 */
                ofs = ndr->offset + 64;
index 4c961f84f4e4b9a682616c11cc98553523317ab5..e79c430362e293d49ab9232d85144edb0d6c521b 100644 (file)
@@ -362,7 +362,7 @@ static enum ndr_err_code ndr_pull_compression_mszip_chunk(struct ndr_pull *ndrpu
        z->total_out    = 0;
 
        if (!z->opaque) {
-               /* the first time we need to intialize completely */
+               /* the first time we need to initialize completely */
                z->zalloc       = ndr_zlib_alloc;
                z->zfree        = ndr_zlib_free;
                z->opaque       = ndrpull;
@@ -376,7 +376,7 @@ static enum ndr_err_code ndr_pull_compression_mszip_chunk(struct ndr_pull *ndrpu
                }
        }
 
-       /* call inflate untill we get Z_STREAM_END or an error */
+       /* call inflate until we get Z_STREAM_END or an error */
        while (true) {
                z_ret = inflate(z, Z_BLOCK);
                if (z_ret != Z_OK) break;
@@ -475,7 +475,7 @@ static enum ndr_err_code ndr_push_compression_mszip_chunk(struct ndr_push *ndrpu
        z->total_out    = 0;
 
        if (!z->opaque) {
-               /* the first time we need to intialize completely */
+               /* the first time we need to initialize completely */
                z->zalloc       = ndr_zlib_alloc;
                z->zfree        = ndr_zlib_free;
                z->opaque       = ndrpull;
@@ -495,14 +495,14 @@ static enum ndr_err_code ndr_push_compression_mszip_chunk(struct ndr_push *ndrpu
                }
        }
 
-       /* call deflate untill we get Z_STREAM_END or an error */
+       /* call deflate until we get Z_STREAM_END or an error */
        while (true) {
                z_ret = deflate(z, Z_FINISH);
                if (z_ret != Z_OK) break;
        }
        if (z_ret != Z_STREAM_END) {
                return ndr_push_error(ndrpush, NDR_ERR_COMPRESSION,
-                                     "Bad delate(Z_BLOCK) error %s(%d) (PUSH)",
+                                     "Bad deflate(Z_BLOCK) error %s(%d) (PUSH)",
                                      zError(z_ret), z_ret);
        }
 
index 95b0366b7918e7e58375e043c9369f4d6d164bbf..b2f965c9d43ca82c15b1d22c8826b59bb052a991 100644 (file)
@@ -1,20 +1,20 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
 
    routines for marshalling/unmarshalling string types
 
    Copyright (C) Andrew Tridgell 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/>.
 */
@@ -120,7 +120,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int ndr_flags,
        case LIBNDR_FLAG_STR_NULLTERM:
                /*
                 * We ensure that conv_str_len cannot return 0 by
-                * requring that there be enough bytes for at least
+                * requiring that there be enough bytes for at least
                 * the NULL terminator
                 */
                if (byte_mul == 1) {
@@ -209,7 +209,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags,
        if (NDR_BE(ndr)) {
                chset = CH_UTF16BE;
        }
-       
+
        s_len = s?strlen(s):0;
 
        if (flags & LIBNDR_FLAG_STR_ASCII) {
@@ -245,7 +245,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags,
        } else if (!convert_string_talloc(ndr, CH_UNIX, chset, s, s_len,
                                   (void **)(void *)&dest, &d_len))
        {
-               return ndr_push_error(ndr, NDR_ERR_CHARCNV, 
+               return ndr_push_error(ndr, NDR_ERR_CHARCNV,
                                      "Bad character push conversion with flags 0x%x", flags);
        }
 
@@ -290,7 +290,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push *ndr, int ndr_flags,
        default:
                if (ndr->flags & LIBNDR_FLAG_REMAINING) {
                        NDR_CHECK(ndr_push_bytes(ndr, dest, d_len));
-                       break;          
+                       break;
                }
 
                return ndr_push_error(ndr, NDR_ERR_STRING, "Bad string flags 0x%x\n",
@@ -348,7 +348,7 @@ _PUBLIC_ void ndr_print_string(struct ndr_print *ndr, const char *name, const ch
        }
 }
 
-_PUBLIC_ uint32_t ndr_size_string(int ret, const char * const* string, int flags) 
+_PUBLIC_ uint32_t ndr_size_string(int ret, const char * const* string, int flags)
 {
        /* FIXME: Is this correct for all strings ? */
        if(!(*string)) return ret;
@@ -458,7 +458,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string_array(struct ndr_pull *ndr, int ndr_f
                 * but separated by a null terminator
                 *
                 * which means the same as:
-                * Every string is null terminated exept the last
+                * Every string is null terminated except the last
                 * string is terminated by the end of the buffer
                 *
                 * as LIBNDR_FLAG_STR_NULLTERM also end at the end
@@ -547,7 +547,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_string_array(struct ndr_push *ndr, int ndr_f
                return ndr_push_error(ndr, NDR_ERR_STRING, "Bad string flags 0x%x\n",
                                      ndr->flags & LIBNDR_STRING_FLAGS);
        }
-       
+
        ndr->flags = saved_flags;
        return NDR_ERR_SUCCESS;
 }
@@ -601,7 +601,7 @@ _PUBLIC_ size_t ndr_size_string_array(const char **a, uint32_t count, int flags)
 }
 
 /**
- * Return number of elements in a string including the last (zeroed) element 
+ * Return number of elements in a string including the last (zeroed) element
  */
 _PUBLIC_ uint32_t ndr_string_length(const void *_var, uint32_t element_size)
 {
@@ -700,7 +700,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_charset(struct ndr_pull *ndr, int ndr_flags,
                                   discard_const_p(void *, var),
                                   &converted_size))
        {
-               return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
+               return ndr_pull_error(ndr, NDR_ERR_CHARCNV,
                                      "Bad character conversion");
        }
        NDR_CHECK(ndr_pull_advance(ndr, length*byte_mul));
@@ -755,7 +755,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_charset(struct ndr_push *ndr, int ndr_flags,
                return ndr_push_error(ndr, NDR_ERR_LENGTH, "length overflow");
        }
        required = byte_mul * length;
-       
+
        NDR_PUSH_NEED_BYTES(ndr, required);
 
        if (required) {
@@ -768,7 +768,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_charset(struct ndr_push *ndr, int ndr_flags,
                if (!convert_string(CH_UNIX, chset,
                             var, strlen(var),
                             ndr->data+ndr->offset, required, &size)) {
-                       return ndr_push_error(ndr, NDR_ERR_CHARCNV, 
+                       return ndr_push_error(ndr, NDR_ERR_CHARCNV,
                                      "Bad character conversion");
                }
 
index bc44fd38e3372813b3cfa52ee05037c5ff0662c2..69a3eda8a6bbd5ad111d6853047d7430ca2ed5f9 100644 (file)
@@ -38,7 +38,7 @@ NTSTATUS ndr_table_register(const struct ndr_interface_table *table)
        for (l = ndr_interfaces; l; l = l->next) {
                /*
                 * If no GUID is supplied, use the name to determine
-                * uniquness.
+                * uniqueness.
                 */
                if (GUID_all_zero(&table->syntax_id.uuid)) {
                        if (strcmp(table->name,
@@ -61,7 +61,7 @@ NTSTATUS ndr_table_register(const struct ndr_interface_table *table)
        }
 
        /*
-        * This is a singleton instance guarenteed
+        * This is a singleton instance guaranteed
         * by the above check to be only added once
         * into the list so we can allocate off the NULL
         * context. We never want this to be freed