libpurple/protocols/silc/util.c

changeset 37523
02346b6472b3
parent 36034
4bba5ea5d08a
child 38298
f0a8f63f9312
equal deleted inserted replaced
37522:cea3a32612b0 37523:02346b6472b3
498 if (mood & SILC_ATTRIBUTE_MOOD_EXCITED) 498 if (mood & SILC_ATTRIBUTE_MOOD_EXCITED)
499 g_string_append_printf(s, "[%s] ", _("Excited")); 499 g_string_append_printf(s, "[%s] ", _("Excited"));
500 if (mood & SILC_ATTRIBUTE_MOOD_ANXIOUS) 500 if (mood & SILC_ATTRIBUTE_MOOD_ANXIOUS)
501 g_string_append_printf(s, "[%s] ", _("Anxious")); 501 g_string_append_printf(s, "[%s] ", _("Anxious"));
502 } 502 }
503 if (strlen(s->str)) { 503 if (*s->str != '\0') {
504 *moodstr = g_string_free(s, FALSE); 504 *moodstr = g_string_free(s, FALSE);
505 g_strchomp(*moodstr); 505 g_strchomp(*moodstr);
506 } else 506 } else
507 g_string_free(s, TRUE); 507 g_string_free(s, TRUE);
508 508
527 if (contact & SILC_ATTRIBUTE_CONTACT_MMS) 527 if (contact & SILC_ATTRIBUTE_CONTACT_MMS)
528 g_string_append_printf(s, "[%s] ", _("MMS")); 528 g_string_append_printf(s, "[%s] ", _("MMS"));
529 if (contact & SILC_ATTRIBUTE_CONTACT_VIDEO) 529 if (contact & SILC_ATTRIBUTE_CONTACT_VIDEO)
530 g_string_append_printf(s, "[%s] ", _("Video Conferencing")); 530 g_string_append_printf(s, "[%s] ", _("Video Conferencing"));
531 } 531 }
532 if (strlen(s->str)) { 532 if (*s->str != '\0') {
533 *contactstr = g_string_free(s, FALSE); 533 *contactstr = g_string_free(s, FALSE);
534 g_strchomp(*contactstr); 534 g_strchomp(*contactstr);
535 } else 535 } else
536 g_string_free(s, TRUE); 536 g_string_free(s, TRUE);
537 537
556 device.manufacturer ? device.manufacturer : "", 556 device.manufacturer ? device.manufacturer : "",
557 device.version ? device.version : "", 557 device.version ? device.version : "",
558 device.model ? device.model : "", 558 device.model ? device.model : "",
559 device.language ? device.language : ""); 559 device.language ? device.language : "");
560 } 560 }
561 if (strlen(s->str)) 561 if (*s->str != '\0')
562 *devicestr = g_string_free(s, FALSE); 562 *devicestr = g_string_free(s, FALSE);
563 else 563 else
564 g_string_free(s, TRUE); 564 g_string_free(s, TRUE);
565 565
566 attr = silcpurple_get_attr(attrs, SILC_ATTRIBUTE_TIMEZONE); 566 attr = silcpurple_get_attr(attrs, SILC_ATTRIBUTE_TIMEZONE);

mercurial