The "initial_status = 0;" call just zeroes out the field before ua_location_service_controller_query_status() populates it with a real value. It might make sense to remove that line as it's a dead store; still, it's harmless in the context you're talking about.
UALocationServiceStatusFlags is an enum with the fields "UA_LOCATION_SERVICE_GPS_ENABLED" and "UA_LOCATION_SERVICE_ENABLED", so 0 means neither are enabled. So we're in agreement about what the Controller's initial status should be (and is) before ua_location_service_controller_query_status() is called.
I'm not sure that code block needs fixing?
The "initial_status = 0;" call just zeroes out the field before ua_location_ service_ controller_ query_status( ) populates it with a real value. It might make sense to remove that line as it's a dead store; still, it's harmless in the context you're talking about.
UALocationServi ceStatusFlags is an enum with the fields "UA_LOCATION_ SERVICE_ GPS_ENABLED" and "UA_LOCATION_ SERVICE_ ENABLED" , so 0 means neither are enabled. So we're in agreement about what the Controller's initial status should be (and is) before ua_location_ service_ controller_ query_status( ) is called.