The manual says:

     If the buffer has no recorded last modification time, this function
     returns zero.

and also says this at the end:

     If the buffer is not visiting a file, this function returns -1.


Tested with the buffer “*scratch*” and “*Messages*”, it both returned 0 not -1.
It seems that the latter sentence in manual is useless.