It seems like the only differences from the previous ril_sim_update_record() function are the parameter list and the lines that set mode and record.   Perhaps the bulk of these two functions could be collapsed/merged into a common helper function?