diff options
author | Mike Marshall <hubcap@omnibond.com> | 2015-09-29 11:17:26 -0400 |
---|---|---|
committer | Mike Marshall <hubcap@omnibond.com> | 2015-10-03 11:44:35 -0400 |
commit | 50e01586f4b10dc7aa534bbfcd1707586e7b32e0 (patch) | |
tree | 24023299f4ae1cb7154dcab691bc98f2b39ae618 /fs/orangefs/protocol.h | |
parent | f957ae2dec09b63b44df9ec06765cbdc52666eec (diff) | |
download | linux-stable-50e01586f4b10dc7aa534bbfcd1707586e7b32e0.tar.gz linux-stable-50e01586f4b10dc7aa534bbfcd1707586e7b32e0.tar.bz2 linux-stable-50e01586f4b10dc7aa534bbfcd1707586e7b32e0.zip |
Orangefs: Don't opencode memcpy.
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/protocol.h')
-rw-r--r-- | fs/orangefs/protocol.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/fs/orangefs/protocol.h b/fs/orangefs/protocol.h index c50c6e30f5a8..cdbde64f8e39 100644 --- a/fs/orangefs/protocol.h +++ b/fs/orangefs/protocol.h @@ -70,30 +70,21 @@ static inline int PVFS_khandle_cmp(const struct pvfs2_khandle *kh1, return 0; } -/* copy a khandle to a field of arbitrary size */ static inline void PVFS_khandle_to(const struct pvfs2_khandle *kh, void *p, int size) { - int i; - unsigned char *c = p; memset(p, 0, size); + memcpy(p, kh->u, 16); - for (i = 0; i < 16 && i < size; i++) - c[i] = kh->u[i]; } -/* copy a khandle from a field of arbitrary size */ static inline void PVFS_khandle_from(struct pvfs2_khandle *kh, void *p, int size) { - int i; - unsigned char *c = p; - memset(kh, 0, 16); + memcpy(kh->u, p, 16); - for (i = 0; i < 16 && i < size; i++) - kh->u[i] = c[i]; } /* pvfs2-types.h ************************************************************/ |