sscanf return value

man sscanf 會看到這樣的描述

return the number of input items successfully matched and assigned, which can be fewer than provided for, or even zero in the event of an early matching failure.

所以我就寫了這樣的code

if (sscanf(...) != 0) {
	...
}

但其實他有可能return -1,導致意料外的結果。

自稱工程師真是對不起。