[api] Use PROTO_VARINT_PARSE_FAILED constant in parse failure returns

Replace magic {0, 0} with {0, PROTO_VARINT_PARSE_FAILED} in parse_slow()
and parse_wide() for consistency with the named sentinel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
J. Nick Koston
2026-03-08 21:06:22 -10:00
parent e7ce2703e8
commit 765bb3298e
+2 -2
View File
@@ -38,7 +38,7 @@ ProtoVarIntResult ProtoVarInt::parse_slow(const uint8_t *buffer, uint32_t len) {
#ifdef USE_API_VARINT64
return parse_wide(buffer, len, result32);
#else
return {0, 0};
return {0, PROTO_VARINT_PARSE_FAILED};
#endif
}
@@ -53,7 +53,7 @@ ProtoVarIntResult ProtoVarInt::parse_wide(const uint8_t *buffer, uint32_t len, u
return {result64, i + 1};
}
}
return {0, 0};
return {0, PROTO_VARINT_PARSE_FAILED};
}
#endif