Add some comments to uat_new().
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 30 Dec 2008 17:21:19 +0000 (17:21 +0000)
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 30 Dec 2008 17:21:19 +0000 (17:21 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27134 f5534014-38df-0310-8fa8-9805f1628bb7

epan/uat.c

index 8bfd325195f8ae634021d6ea9c007ec2d8482999..c4212be3a1ae48364b1a1a95ce90a5655b54b865 100644 (file)
@@ -68,16 +68,20 @@ uat_t* uat_new(const char* name,
                           uat_update_cb_t update_cb,
                           uat_free_cb_t free_cb,
                           uat_field_t* flds_array) {
+       /* Create new uat */
        uat_t* uat = g_malloc(sizeof(uat_t));
        guint i;
 
+       /* Add to global array of uats */
        if (!all_uats)
                all_uats = g_ptr_array_new();
 
        g_ptr_array_add(all_uats,uat);
 
+       /* Check params */
        g_assert(name && size && filename && data_ptr && numitems_ptr);
 
+       /* Set uat values from inputs */
        uat->name = g_strdup(name);
        uat->record_size = size;
        uat->filename = g_strdup(filename);
@@ -108,7 +112,6 @@ uat_t* uat_new(const char* name,
 
        uat->ncols = i;
 
-
        *data_ptr = NULL;
        *numitems_ptr = 0;