[OPEN-ILS-DEV] PATCH: osrf_list.[ch] (miscellaneous)
Scott McKellar
mck9 at swbell.net
Sun Dec 30 13:14:43 EST 2007
These patches tidy up various things.
1. I moved the macros OSRF_LIST_DEFAULT_SIZE and OSRF_LIST_INC_SIZE
from the header into the implementation file. No other source files
reference them, nor should they.
2. I moved the OSRF_LIST_MAX_SIZE macro into the implementation file
as well, and then commented it out. It is nowhere referenced, but
out of caution I preserved it like a fly in amber.
3. I removed a leading underscore from each of the struct names
__osrfListStruct and __osrfListIteratorStruct.
4. I removed some obsolete comment text concerning osrfNewList().
5. I deleted the declaration for __osrfListSetSize(), which is
nowhere defined.
6. I made sure to explicitly initialize all struct members.
7. When allocating pointer arrays, I explicitly initialize all the
pointers to NULL.
8. I rewrote osrfNewList() as a thin wrapper for osrfNewListSize(),
to eliminate some duplication of code.
----------
In the header, a comment says that osrfListGetCount returns "The
number of non-null items in the list." This comment is not accurate.
The function returns the number of items in the list, excluding
trailing NULLs. If there are any NULLs preceding the last non-NULL
pointer, they are included in the count.
I left this function alone, because I didn't know whether to fix the
function or the comment.
Scott McKellar
http://home.swbell.net/mck9/ct/
Developer's Certificate of Origin 1.1 By making a contribution to
this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license indicated
in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source license
and I have the right under that license to submit that work with
modifications, whether created in whole or in part by me, under the
same open source license (unless I am permitted to submit under a
different license), as indicated in the file; or
(c) The contribution was provided directly to me by some other person
who certified (a), (b) or (c) and I have not modified it; and
(d) In the case of each of (a), (b), or (c), I understand and agree
that this project and the contribution are public and that a record
of the contribution (including all personal information I submit
with it, including my sign-off) is maintained indefinitely and may
be redistributed consistent with this project or the open source
license indicated in the file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osrf_list_h_1.patch
Type: text/x-patch
Size: 3174 bytes
Desc: 3555483214-osrf_list_h_1.patch
Url : http://list.georgialibraries.org/pipermail/open-ils-dev/attachments/20071230/c6a359a7/osrf_list_h_1.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osrf_list_c_1.patch
Type: text/x-patch
Size: 2635 bytes
Desc: 233489026-osrf_list_c_1.patch
Url : http://list.georgialibraries.org/pipermail/open-ils-dev/attachments/20071230/c6a359a7/osrf_list_c_1.bin
More information about the Open-ils-dev
mailing list