search for: dst_size

Displaying 4 results from an estimated 4 matches for "dst_size".

Did you mean: st_size
2023 Aug 09
8
[PATCH -next 0/7] drm: Remove many unnecessary NULL values
The NULL initialization of the pointers assigned by kzalloc() or kunit_kzalloc() first is not necessary, because if the kzalloc() or kunit_kzalloc() failed, the pointers will be assigned NULL, otherwise it works as usual. so remove it. Ruan Jinjie (7): drm/amdkfd: Remove unnecessary NULL values drm/amd/display: Remove unnecessary NULL values drm/msm: Remove unnecessary NULL values
2020 Nov 05
1
[PATCH libnbd] copy: Allowing copying from NBD server to NBD server.
This patch is a straightforward refactoring of libnbd?s nbdcopy program, and not very interesting. However I have plans for nbdcopy (see full todo below). I would like to use this utility for virt-v2v as a replacement for ?qemu-img convert?. qemu-img has caused us a series of problems: - change in zeroing behaviour caused a big performance regression - qemu-img reads extents up-front which
2016 Feb 13
4
[Bug 2540] New: Adds xstrndup() to xmalloc.h/xmalloc.c in OpenSSH 7.x
...tribute__((__nonnull__ (2))); ======================================================================= --- xmalloc.c.orig 2016-02-13 09:33:10.108121542 -0800 +++ xmalloc.c 2016-02-13 09:34:07.203378056 -0800 @@ -79,6 +79,20 @@ return cp; } +char * +xstrndup(const char *str, size_t dst_size) +{ + char *cp; + size_t len; + + len = strlen(str) + 1; + if (len > size) + len = size + 1; + cp = xmalloc(len); + strlcpy(cp, str, len); + return cp; +} + int xasprintf(char **ret, const char *fmt, ...) { ============================...
2010 Mar 20
2
[PATCH 4/4] btrfs-convert: split into convert/.
...d; -} acl_ea_entry; - -typedef struct { - __le32 a_version; - acl_ea_entry a_entries[0]; -} acl_ea_header; - -static inline size_t acl_ea_size(int count) -{ - return sizeof(acl_ea_header) + count * sizeof(acl_ea_entry); -} - -static int ext2_acl_to_xattr(void *dst, const void *src, - size_t dst_size, size_t src_size) -{ - int i, count; - const void *end = src + src_size; - acl_ea_header *ext_acl = (acl_ea_header *)dst; - acl_ea_entry *dst_entry = ext_acl->a_entries; - ext2_acl_entry *src_entry; - - if (src_size < sizeof(ext2_acl_header)) - goto fail; - if (((ext2_acl_header *)src)->a...