Avoid signed vs unsigned comparason warning.

This commit is contained in:
Michael Drake 2014-06-04 07:48:05 +01:00
parent 5899f6c16e
commit bd804d3fe4

View File

@ -1116,7 +1116,7 @@ store(nsurl *url,
written = write(fd, data, datalen);
close(fd);
if (written < datalen) {
if (written < 0 || (size_t) written < datalen) {
/** @todo Delete the file? */
return NSERROR_SAVE_FAILED;
}