From d2640176840fc05384a187cb8bf14f084618956c Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Mon, 26 May 2008 08:43:50 +0000 Subject: [PATCH] * lib/sgroupio.c: Avoid assignments in comparisons. * lib/sgroupio.c: Add brackets. * lib/sgroupio.c: Avoid implicit conversion of pointers / integers to booleans. * lib/sgroupio.c: The changed, isopen, locked, and readonly fields of the db are booleans. * lib/sgroupio.h, lib/sgroupio.c: sgr_file_present returns a bool. * lib/sgroupio.h: Add protection against multiple inclusions. --- ChangeLog | 11 +++++++++++ lib/sgroupio.h | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e141aafb..e352390e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-05-26 Nicolas François + + * lib/sgroupio.c: Avoid assignments in comparisons. + * lib/sgroupio.c: Add brackets. + * lib/sgroupio.c: Avoid implicit conversion of pointers / integers + to booleans. + * lib/sgroupio.c: The changed, isopen, locked, and readonly fields + of the db are booleans. + * lib/sgroupio.h, lib/sgroupio.c: sgr_file_present returns a bool. + * lib/sgroupio.h: Add protection against multiple inclusions. + 2008-05-26 Nicolas François * lib/gshadow.c: nis_used and nis_bound are booleans. diff --git a/lib/sgroupio.h b/lib/sgroupio.h index 7bcb9c23..01954f11 100644 --- a/lib/sgroupio.h +++ b/lib/sgroupio.h @@ -31,8 +31,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* $Id$ */ +#ifndef _SGROUPIO_H +#define _SGROUPIO_H + extern int sgr_close (void); -extern int sgr_file_present (void); +extern bool sgr_file_present (void); extern const struct sgrp *sgr_locate (const char *); extern int sgr_lock (void); extern int sgr_name (const char *); @@ -44,3 +48,4 @@ extern int sgr_unlock (void); extern int sgr_update (const struct sgrp *); extern int sgr_sort (void); +#endif