From 37eec1377497c004191f1164ff4afa7cb8bd0a4c Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Fri, 24 Apr 2009 22:27:09 +0000 Subject: [PATCH] * src/faillog.c: Remove function calls from within assert(). --- ChangeLog | 4 ++++ src/faillog.c | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 589abdd8..b674c485 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-04-25 Nicolas François + + * src/faillog.c: Remove function calls from within assert(). + 2009-04-25 Nicolas François * libmisc/mail.c: Ignore the return value of puts(). diff --git a/src/faillog.c b/src/faillog.c index d6fa4600..4bfcb1f4 100644 --- a/src/faillog.c +++ b/src/faillog.c @@ -105,7 +105,8 @@ static void print_one (/*@null@*/const struct passwd *pw, bool force) offset = pw->pw_uid * sizeof (fl); if (offset <= (statbuf.st_size - sizeof (fl))) { /* fseeko errors are not really relevant for us. */ - assert ( fseeko (fail, offset, SEEK_SET) == 0 ); + int err = fseeko (fail, offset, SEEK_SET); + assert (0 == err); /* faillog is a sparse file. Even if no entries were * entered for this user, which should be able to get the * empty entry in this case. @@ -204,7 +205,8 @@ static bool reset_one (uid_t uid) offset = uid * sizeof (fl); if (offset <= (statbuf.st_size - sizeof (fl))) { /* fseeko errors are not really relevant for us. */ - assert ( fseeko (fail, offset, SEEK_SET) == 0 ); + int err = fseeko (fail, offset, SEEK_SET); + assert (0 == err); /* faillog is a sparse file. Even if no entries were * entered for this user, which should be able to get the * empty entry in this case. @@ -290,7 +292,8 @@ static bool setmax_one (uid_t uid, int max) offset = (off_t) uid * sizeof (fl); if (offset <= (statbuf.st_size - sizeof (fl))) { /* fseeko errors are not really relevant for us. */ - assert ( fseeko (fail, offset, SEEK_SET) == 0 ); + int err = fseeko (fail, offset, SEEK_SET); + assert (0 == err); /* faillog is a sparse file. Even if no entries were * entered for this user, which should be able to get the * empty entry in this case. @@ -380,7 +383,8 @@ static bool set_locktime_one (uid_t uid, long locktime) offset = (off_t) uid * sizeof (fl); if (offset <= (statbuf.st_size - sizeof (fl))) { /* fseeko errors are not really relevant for us. */ - assert ( fseeko (fail, offset, SEEK_SET) == 0 ); + int err = fseeko (fail, offset, SEEK_SET); + assert (0 == err); /* faillog is a sparse file. Even if no entries were * entered for this user, which should be able to get the * empty entry in this case.