Lines Matching defs:sz
17 static int try_to_realloc_ndr_blob(struct ndr *n, size_t sz)
21 data = krealloc(n->data, n->offset + sz + 1024, KSMBD_DEFAULT_GFP);
76 static int ndr_write_bytes(struct ndr *n, void *value, size_t sz)
78 if (n->length <= n->offset + sz) {
81 ret = try_to_realloc_ndr_blob(n, sz);
86 memcpy(ndr_get_field(n), value, sz);
87 n->offset += sz;
93 size_t sz;
95 sz = strlen(value) + 1;
96 if (n->length <= n->offset + sz) {
99 ret = try_to_realloc_ndr_blob(n, sz);
104 memcpy(ndr_get_field(n), value, sz);
105 n->offset += sz;
110 static int ndr_read_string(struct ndr *n, void *value, size_t sz)
114 if (n->offset + sz > n->length)
117 len = strnlen(ndr_get_field(n), sz);
126 static int ndr_read_bytes(struct ndr *n, void *value, size_t sz)
128 if (n->offset + sz > n->length)
132 memcpy(value, ndr_get_field(n), sz);
133 n->offset += sz;