scanner: Fix undefined behavior around qsort
According to clang, qsort cannot be passed a null pointer, even if the size is specified to be zero. The scanner can hit this while trying to sort forward declarations if it happens to be building a protocol file that doesn't require any, either in the header or the source.
Signed-off-by: Fergus Dall sidereal@google.com
For the record, this was triggered by this custom protocol used in ChromeOS.