On Nov 2, 8:49am, p...@whooppee.com (Paul Goyette) wrote: -- Subject: Re: CVS commit: src/sys/dev/pci
| > Why *len = 1 here? Shouldn't it be 0 since there is no more room left? | | No. :) | | The maximum number of characters actually written by vsnprintf() will | never exceed (len - 1). So, dest gets incremented by the max, and len | gets decremented by the max. | | There is always enough room left for vsnprintf() to create a new | trailing NUL. But that's doing extra work for no reason... christos