And just make sure we always have 0/0 if we have an error
CID #1352031
const gchar *str;
str = g_value_get_string (value);
- if (str) {
- sscanf (str, "%u-%u",
- &rtsp_client_sink->client_port_range.min,
- &rtsp_client_sink->client_port_range.max);
- } else {
+ if (!str || !sscanf (str, "%u-%u",
+ &rtsp_client_sink->client_port_range.min,
+ &rtsp_client_sink->client_port_range.max)) {
rtsp_client_sink->client_port_range.min = 0;
rtsp_client_sink->client_port_range.max = 0;
}