Encapsulating snprintf to avoid repetition of sizeof
Pedantically, if (snprintf(buff, sizeof(buff), format, ...) &gt;= SSIZEOF(buff)) goto err; is an insufficient test.  Test for &lt; 0 is also needed.


  The snprintf function returns the number of characters that would have been written
  had n been sufficiently large, not counting the terminating null character, or a negative value if an encoding error occurred....
  C111 §7.21.6.5 3




Note that ssize_t itself is not in standard C. 



To cope with both issues, perform 2 sided test and drop using ssize_t.

int i = snprintf(buff, sizeof(buff), format, ...);
if (i &lt; 0 || (unsigned) i &gt;= sizeof(buff)) goto err;


... or if INT_MAX &lt;= UINT_MAX/2 (a very common implementation), code can cheat with a one sided test as i&lt;0 coverts to a large unsigned.  Again no need for ssize_t.

int i = snprintf(buff, sizeof(buff), format, ...);
if ((unsigned) i &gt;= sizeof(buff)) goto err;