Make the status type a struct, not an int32_t

This commit is contained in:
Nigel Tao committed 2018-08-11 13:27:29 +10:00
1 parent 9c0b2d2f5c
commit 2a32a86a6c
26 files changed
+791 -668

No files matched your search

+4 -4
View File
@@ -51,8 +51,8 @@ const char* fuzz(wuffs_base__io_reader src_reader, uint32_t hash) {
wuffs_zlib__decoder dec = ((wuffs_zlib__decoder){});
wuffs_base__status z =
wuffs_zlib__decoder__check_wuffs_version(&dec, sizeof dec, WUFFS_VERSION);
if (z) {
return wuffs_zlib__status__string(z);
if (z.code) {
return wuffs_zlib__status__string(z.code);
}
// Ignore the checksum for 99.99%-ish of all input. When fuzzers generate
@@ -68,8 +68,8 @@ const char* fuzz(wuffs_base__io_reader src_reader, uint32_t hash) {
while (true) {
dst.wi = 0;
z = wuffs_zlib__decoder__decode(&dec, dst_writer, src_reader);
if (z != WUFFS_BASE__SUSPENSION_SHORT_WRITE) {
ret = wuffs_zlib__status__string(z);
if (z.code != WUFFS_BASE__SUSPENSION_SHORT_WRITE) {
ret = wuffs_zlib__status__string(z.code);
break;
}
if (dst.wi == 0) {