mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
wire: remove redundant size check from fromwire_var_int
This commit is contained in:
committed by
Rusty Russell
parent
21a0dad016
commit
fc0c97d06d
@@ -103,11 +103,6 @@ bool fromwire_bool(const u8 **cursor, size_t *max)
|
||||
|
||||
u64 fromwire_var_int(const u8 **cursor, size_t *max)
|
||||
{
|
||||
if (*max < 1) {
|
||||
fromwire_fail(cursor, max);
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 flag = fromwire_u8(cursor, max);
|
||||
|
||||
switch(flag) {
|
||||
|
||||
Reference in New Issue
Block a user