[OPEN-ILS-DEV] PATCH: transport_message.[ch] (miscellaneous)
Scott McKellar
mck9 at swbell.net
Tue Dec 9 19:56:00 EST 2008
These patches tidy up a few things. They are independent of the patches
I submitted yesterday.
1. In the header: removed a commented-out prototype for
message_init_xml(), to which I could find no reference elsewhere.
2. Since message_prepare_xml() was a trivial wrapper for message_to_xml(),
which is not called anywhere else, I combined them into a single
function message_prepare_xml().
3. In message_set_osrf_xid() and message_set_router_info(): added code to
free the various members before replacing them, in order to avoid a
potential memory leak.
------------------------------
In message_set_osrf_xid() and message_set_router_info() I not only added
some new code but also replaced the existing if/else code with the
ternary conditional operator ('?' and ':'). I am not a big fan of the
ternary conditional operator because it usually makes the code more
cryptic. In this case, however, the results are compact, repetitive,
and stereotyped. To my eyes the new version is easier to read.
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: transport_message_h_3.patch
Type: text/x-patch
Size: 1549 bytes
Desc: not available
Url : http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20081209/a97dd644/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: transport_message_c_4.patch
Type: text/x-patch
Size: 5195 bytes
Desc: not available
Url : http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20081209/a97dd644/attachment-0001.bin
More information about the Open-ils-dev
mailing list