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

GByteArray* byte_array_dup ( GByteArray *  ba  ) 

Create a copy of a GByteArray

Parameters:
ba The byte array to be copied.
Returns:
If ba exists, a freshly allocated copy. NULL otherwise.
XXX - Should this be in strutil.c?

Definition at line 674 of file strutil.c.

                               {
    GByteArray *new_ba;

    if (!ba)
      return NULL;

    new_ba = g_byte_array_new();
    g_byte_array_append(new_ba, ba->data, ba->len);
    return new_ba;
}


Generated by  Doxygen 1.6.0   Back to index