net: Do guard check after variable declaration

C89.