It depends on your diff command. Mine (GNU diffutils 3.0) says:
An exit status of
0means no differences were found,1means some
differences were found, and2means trouble. Normally, differing
binary files count as trouble, but this can be altered by using the
-aor--textoption, or the-qor--briefoption.