Subject: Re: /etc/login.conf required to exist after user(8) changes
To: Lennart Augustsson <lennart@augustsson.net>
From: John Nemeth <jnemeth@victoria.tc.ca>
List: current-users
Date: 07/29/2005 04:03:47
On Dec 19, 7:33am, Lennart Augustsson wrote:
} Hubert Feyrer wrote:
} > On Fri, 29 Jul 2005, Jukka Salmi wrote:
} >
} >> I'm talking about the [1]changes made to src/usr.sbin/user/user.c
} >> between revisions 1.81 and 1.82, committed by christos, including
} >> "patches from Liam Foy" (was there a PR?).
} >
} > ...
} >
} >> The attached patch fixes both problems.
} >
} > I see. Would it be possible to rewrite
} >
} > + ret = lc != NULL;
} >
} > as something like
} > ret = (lc == NULL)?1:0;
} >
} > ? It's more readable IMHO.
}
} Well, that's a matter of taste. I find the latter more difficult to
} read. Possibly
} ret = (lc != NULL);
I think more to the point, it is irrelevant that the pointer has
been freed. It will still contain the same value. The freeing
function can not modify the pointer itself; therefore, the second half
of the patch is completely unnecessary. Trying to use the data pointed
to by the pointer would be wrong; however, the original code doesn't do
this, it merely compares the pointer to NULL.
}-- End of excerpt from Lennart Augustsson