]> granicus.if.org Git - shadow/commitdiff
* src/faillog.c: Remove function calls from within assert().
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 24 Apr 2009 22:27:09 +0000 (22:27 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 24 Apr 2009 22:27:09 +0000 (22:27 +0000)
ChangeLog
src/faillog.c

index 589abdd879ab6e1fa90dd5180ce0f11cd8c4046c..b674c4855fd7e7ee4e71bada4066c65979dd8234 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-25  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/faillog.c: Remove function calls from within assert().
+
 2009-04-25  Nicolas François  <nicolas.francois@centraliens.net>
 
        * libmisc/mail.c: Ignore the return value of puts().
index d6fa46006a2a2e17d6c9582928eeb56368880d47..4bfcb1f4afe300d8fa49fbdaa3dec9ae80499f21 100644 (file)
@@ -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.