ITS#10410 WIN32 logging: simplify buffer calculation

This commit is contained in:
Howard Chu 2025-12-01 15:09:21 +00:00
parent ff0f9d94ac
commit afafeaf407

View file

@ -118,8 +118,9 @@ slap_debug_print( const char *data )
poffset = splen - prefixlen;
AC_MEMCPY( ptr+poffset, ptr, prefixlen );
}
ptr += poffset+prefixlen;
ptr = lutil_strncopy( ptr+poffset+prefixlen, data, sizeof(msgbuf) - prefixlen);
ptr = lutil_strncopy( ptr, data, sizeof(msgbuf) - (ptr-msgbuf) );
len = ptr - msgbuf - poffset;
datalen = len - prefixlen;
if ( !logfile_only )