]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
using __builtin_strlen
authorAlex Markuze <amarkuze@redhat.com>
Tue, 15 Apr 2025 12:38:45 +0000 (12:38 +0000)
committerAlex Markuze <amarkuze@redhat.com>
Tue, 15 Apr 2025 12:38:45 +0000 (12:38 +0000)
include/linux/ceph/ceph_san_ser.h

index 747f5ac6a302b594b006497b25634a3f9f542b1e..37d86b9f60bb7ac088531a0d73607d4239bd2a80 100644 (file)
@@ -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)),            \