From: Andreas Schneider Date: Tue, 6 Jun 2023 10:59:25 +0000 (+0200) Subject: librpc:ndr: Fix code spelling X-Git-Tag: talloc-2.4.1~282 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ec8ecce07615a4e6ac208bc600e0b1cacb058da;p=thirdparty%2Fsamba.git librpc:ndr: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- diff --git a/librpc/ndr/ndr.c b/librpc/ndr/ndr.c index 25765880d8b..44cf524867d 100644 --- a/librpc/ndr/ndr.c +++ b/librpc/ndr/ndr.c @@ -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; diff --git a/librpc/ndr/ndr_backupkey.c b/librpc/ndr/ndr_backupkey.c index adb6e393287..635c9fa3700 100644 --- a/librpc/ndr/ndr_backupkey.c +++ b/librpc/ndr/ndr_backupkey.c @@ -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; diff --git a/librpc/ndr/ndr_compression.c b/librpc/ndr/ndr_compression.c index 4c961f84f4e..e79c430362e 100644 --- a/librpc/ndr/ndr_compression.c +++ b/librpc/ndr/ndr_compression.c @@ -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); } diff --git a/librpc/ndr/ndr_string.c b/librpc/ndr/ndr_string.c index 95b0366b791..b2f965c9d43 100644 --- a/librpc/ndr/ndr_string.c +++ b/librpc/ndr/ndr_string.c @@ -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 . */ @@ -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"); } diff --git a/librpc/ndr/ndr_table.c b/librpc/ndr/ndr_table.c index bc44fd38e33..69a3eda8a6b 100644 --- a/librpc/ndr/ndr_table.c +++ b/librpc/ndr/ndr_table.c @@ -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