Browse Source

MT#55283 use simpler g_string_append_len

... instead of going through the printf detour when the format is known
and is a string.

Change-Id: Ie06ed15ec64026f227d5f6573ce6737faa4caf39
pull/1786/head
Richard Fuchs 2 years ago
parent
commit
9dfe5b0e73
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      daemon/sdp.c

+ 3
- 2
daemon/sdp.c View File

@ -2951,11 +2951,12 @@ static void append_attr_to_gstring(GString *s, const char * name, const str * va
attr = *attr_subst; attr = *attr_subst;
/* attr name */ /* attr name */
g_string_append_printf(s, "a=" STR_FORMAT, STR_FMT(&attr));
g_string_append(s, "a=");
g_string_append_len(s, attr.s, attr.len);
/* attr value, don't add if substituion presented */ /* attr value, don't add if substituion presented */
if (value && !attr_subst) if (value && !attr_subst)
g_string_append_printf(s, STR_FORMAT, STR_FMT(value));
g_string_append_len(s, value->s, value->len);
g_string_append(s, "\r\n"); g_string_append(s, "\r\n");
} }


Loading…
Cancel
Save