diff --git a/ChangeLog b/ChangeLog index 0f2efd76..cf986512 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-05-26 Nicolas François + + * lib/pwio.h: Add protection against multiple inclusions. + * lib/pwio.c: The changed, isopen, locked, and readonly fields + of the db are booleans. + 2008-05-26 Nicolas François * lib/shadowio.h, lib/shadowio.c: spw_file_present returns a bool. diff --git a/lib/pwio.c b/lib/pwio.c index 820467c0..f36fec22 100644 --- a/lib/pwio.c +++ b/lib/pwio.c @@ -102,10 +102,10 @@ static struct commonio_db passwd_db = { NULL, /* head */ NULL, /* tail */ NULL, /* cursor */ - 0, /* changed */ - 0, /* isopen */ - 0, /* locked */ - 0 /* readonly */ + false, /* changed */ + false, /* isopen */ + false, /* locked */ + false /* readonly */ }; int pw_name (const char *filename) diff --git a/lib/pwio.h b/lib/pwio.h index bc662e2d..12a0e63f 100644 --- a/lib/pwio.h +++ b/lib/pwio.h @@ -31,6 +31,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* $Id$ */ +#ifndef _PWIO_H +#define _PWIO_H + #include extern int pw_close (void); extern const struct passwd *pw_locate (const char *); @@ -45,3 +49,4 @@ extern int pw_unlock (void); extern int pw_update (const struct passwd *); extern int pw_sort (void); +#endif