mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 05:28:20 +00:00
Improve return value checking and error handling.
This commit is contained in:
parent
4b24cebad9
commit
daf5d0d098
14 changed files with 101 additions and 33 deletions
|
@ -319,7 +319,8 @@ public:
|
|||
\
|
||||
if ( has_it ) \
|
||||
{ \
|
||||
info->s->Read(&dst, 0, "has_" #dst); \
|
||||
if ( ! info->s->Read(&dst, 0, "has_" #dst) ) \
|
||||
return false; \
|
||||
if ( ! dst ) \
|
||||
return false; \
|
||||
} \
|
||||
|
@ -339,7 +340,11 @@ public:
|
|||
\
|
||||
if ( has_it ) \
|
||||
{ \
|
||||
info->s->Read(&dst, 0, "has_" #dst); \
|
||||
if ( ! info->s->Read(&dst, 0, "has_" #dst) ) \
|
||||
{ \
|
||||
delete del; \
|
||||
return 0; \
|
||||
} \
|
||||
if ( ! dst ) \
|
||||
{ \
|
||||
delete del; \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue