On 1/4/19 1:47 PM, Jonny Grant wrote: > Why not just write an inline function which does after memset :- > > if(*buf!=0) *buf=0; This would only zero one byte, but it would get optimized away as the buffer goes out of scope (= is being discarded).