I would prefer a function call to set this here. This will ensure that people don't forget to set the valid flag. The direct use of the field (albeit possible in C) should be discouraged.