-
Phil Sutter authored
Apart from making the code a bit more compact and efficient, this also prevents a potential buffer overflow if the passed buffer is really too small: Although correctly decrementing the size parameter passed to snprintf, it could become negative which would then wrap since snprintf uses (unsigned) size_t for the parameter. Signed-off-by:
Phil Sutter <phil@nwl.cc>
f63ed3e6