[OPEN-ILS-DEV] component.c -- compile error

Scott McKellar mck9 at swbell.net
Tue Jan 15 00:59:03 EST 2008


I'm not sure what component.c is but it appears to be some kind of demo
or coding example.

Whatever it is, it doesn't compile.  The call to client_init() doesn't
have enough parameters, and of the parameters it does have, the third
is of the wrong type.  Probably it was supposed to be the fourth
parameter, and the third is missing.

If it did compile, there would be a memory leak, because we don't
free the transport_client.  In practice this leak is not very 
important because it occurs at the end of main().  However if this is
supposed to be sample code it should demonstrate good hygiene.

Finally, the #includes show poor form.  As a standard header, signal.h
should be in angle brackets.  As an application-specific header,
opensrf/transport_client.h should be in double quotes.

I'd submit a patch, but I'm not sure what was intended.

Scott McKellar
http://home.swbell.net/mck9/ct/



More information about the Open-ils-dev mailing list