You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In line 76value may have type different from '*bool'.
The type assertion assumes that value is not zero and that value stores a value of type *bool, otherwise the command will cause panic. If value is checked for zero in line 73, then apparently a check for the *bool type is performed in line 76, but such a check is incorrect, because it will cause panic if the value type does not match the *bool type.
I think it would be safer to use the following construction: if _, ok :=value.(*bool); ok { ... }
Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author A. Burke.
The text was updated successfully, but these errors were encountered:
In line 76
value
may have type different from '*bool'.The type assertion assumes that value is not zero and that value stores a value of type
*bool,
otherwise the command will cause panic. If value is checked for zero in line 73, then apparently a check for the *bool type is performed in line 76, but such a check is incorrect, because it will cause panic if the value type does not match the*bool
type.I think it would be safer to use the following construction:
if _, ok :=value.(*bool); ok { ... }
Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author A. Burke.
The text was updated successfully, but these errors were encountered: