regarding mem_0filled, iov_0filled and memdup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,
These functions return 0 when 0filled and non-zero value when not 0filled. This is quite unintuitive as people think that it should return _gf_true when 0filled and false when it is not 0filled. This comes up as bug in reviews quite a few times, so decided may be it is better to change the api itself. What do you say?

Along the same lines is memdup. It is a function in common-utils which does GF_CALLOC, so the memory needs to be freed with GF_FREE. But since it sounds so much like standard api, I have seen people do free instead of GF_FREE. May be it is better to change it to gf_memdup?

Pranith
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://www.gluster.org/mailman/listinfo/gluster-devel




[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux