broadband-modem: minor improvement when reading from match info

This commit is contained in:
Aleksander Morgado
2012-09-14 07:05:24 +02:00
parent 7c9beae013
commit 7be32700fb
+3 -5
View File
@@ -4567,13 +4567,11 @@ cmti_received (MMAtSerialPort *port,
MMBroadbandModem *self)
{
guint idx = 0;
gchar *str, *command;
gchar *command;
SmsPartContext *ctx;
str = g_match_info_fetch (info, 2);
if (str)
idx = atoi (str);
g_free (str);
if (!mm_get_uint_from_match_info (info, 2, &idx))
return;
if (G_UNLIKELY (!self->priv->known_sms_parts))
self->priv->known_sms_parts = g_hash_table_new (g_direct_hash, g_direct_equal);