Add explicit zero-checking and braces to kg_evt_* and packet sending calls for safety