The patch looks good to me.

David Lee wrote:

While chasing another problem, I stumbled across some uncleanliness in "replace/setenv.c" and "replace/unsetenv.c". (This probably doesn't affect Linux.)

1. They weren't using "<portability.h>", but instead re-declared things
   themselves.  I have tidied this.

2. One of the declarations of "unsetenv" had "int" return type. Linux and
   BSD seem to use "void", so I have corrected to this.  (Curiously, when
   Solaris introduced setenv/unsetenv (previously absent) in the
   relatively recent version 10, they made it "int unsetenv(...)".  But
   I'm happy to stick with "void" if that's what folk want.

3. From "replace/setenv.c", the return value of its internal "putenv()"
   wasn't being conveyed back to the caller.  I have corrected this.

<digression>
This last point raises the wider question of the heartbeat not checking the "setenv" return code. Now that the software is so reliant on "setenv" it would seem wise (probably after the forthcoming release) for us to begin to address this: an error-return, though rare, would probably be serious.

good point. I will do that.

-Guochun

_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to