[Bugs] [Bug 1193929] GlusterFS can be improved

bugzilla at redhat.com bugzilla at redhat.com
Fri Sep 7 03:36:50 UTC 2018


https://bugzilla.redhat.com/show_bug.cgi?id=1193929



--- Comment #325 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: https://review.gluster.org/21041 committed in master by "Yaniv Kaul"
<ykaul at redhat.com> with a commit message- libglusterfs/src/dict.c: remove
memcpy(), gf_asprintf -> asprintf

1. We don't need a temp. string to strotol(), we can use data->data.
2. We don't need the gf_asprintf, when a regular asprintf would do.
3. No need to CALLOC the data, can MALLOC, since
we are going to populate most of the fields anyway.
4. Removed is_const member - it was not used.
5. Turned is_static to a gf_boolean_t
6. Turned another get_mem0 to get_mem (in dict_set_lk() func)
7. Remove dict_set_ptr - was exactly the same as dict_set_static_ptr
 (apart from the 'static' bit) and no one was using it.
8. Removed is_static from the dictionary object. Did not seem to be
very useful.

Compile-tested only!

updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul at redhat.com>

Change-Id: I7b1f6320867b154be4a94033819407f7e51cf38c

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list