From: Alex Markuze Date: Tue, 15 Apr 2025 12:38:45 +0000 (+0000) Subject: using __builtin_strlen X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b9c51b3d80f58c7199ec00f87950dd1664bd7938;p=ceph-client.git using __builtin_strlen --- diff --git a/include/linux/ceph/ceph_san_ser.h b/include/linux/ceph/ceph_san_ser.h index 747f5ac6a302..37d86b9f60bb 100644 --- a/include/linux/ceph/ceph_san_ser.h +++ b/include/linux/ceph/ceph_san_ser.h @@ -72,8 +72,8 @@ /* For dynamic arrays, save NULL and string bytes */ \ (*(void **)(__buffer) = NULL, \ (__buffer) = (void *)((char *)(__buffer) + sizeof(void *)), \ - memcpy((__buffer), __suppress_cast_warning(char *, __t), strlen(__suppress_cast_warning(char *, __t)) + 1), \ - (__buffer) = (void *)((char *)(__buffer) + strlen(__suppress_cast_warning(char *, __t)) + 1)), \ + memcpy((__buffer), __suppress_cast_warning(char *, __t), __builtin_strlen(__suppress_cast_warning(char *, __t)) + 1), \ + (__buffer) = (void *)((char *)(__buffer) + __builtin_strlen(__suppress_cast_warning(char *, __t)) + 1)), \ __builtin_choose_expr(sizeof(__t) == 1, \ (*(uint8_t *)(__buffer) = __suppress_cast_warning(uint8_t, __t), \ (__buffer) = (void *)((char *)(__buffer) + 1)), \