Logo Search packages:      
Sourcecode: avahi version File versions  Download package

AvahiStringList* avahi_string_list_add_anonymous ( AvahiStringList l,
size_t  size 

Append a new entry to the string list. The string is not filled with data. The caller should fill in string data afterwards by writing it to l->text, where l is the pointer returned by this function. This function exists solely to optimize a few operations where otherwise superfluous string copying would be necessary.

Definition at line 36 of file strlst.c.

References AvahiStringList::next, AvahiStringList::size, and AvahiStringList::text.

    AvahiStringList *n;

    if (!(n = avahi_malloc(sizeof(AvahiStringList) + size)))
        return NULL;
    n->next = l;
    n->size = size;

    /* NUL terminate strings, just to make sure */
    n->text[size] = 0;

    return n;

Generated by  Doxygen 1.6.0   Back to index