qga: Assign return value of function to the pointer