* src/faillog.c: Re-indent.

This commit is contained in:
nekral-guest 2010-03-18 00:07:00 +00:00
parent d1f5c949a9
commit 41b5cc2d20
2 changed files with 65 additions and 61 deletions

View File

@ -1,3 +1,7 @@
2010-03-17 Nicolas François <nicolas.francois@centraliens.net>
* src/faillog.c: Re-indent.
2010-03-17 Nicolas François <nicolas.francois@centraliens.net> 2010-03-17 Nicolas François <nicolas.francois@centraliens.net>
* lib/tcbfuncs.h: Added type shadowtcb_status. * lib/tcbfuncs.h: Added type shadowtcb_status.

View File

@ -288,19 +288,19 @@ static void reset (void)
if (aflg) { if (aflg) {
/* Entries for non existing users are also reset. /* Entries for non existing users are also reset.
*/ */
uid_t uid = 0; uid_t uid = 0;
/* Make sure we stay in the umin-umax range if specified */ /* Make sure we stay in the umin-umax range if specified */
if (has_umin) { if (has_umin) {
uid = (uid_t)umin; uid = (uid_t)umin;
} }
while (uid <= uidmax) { while (uid <= uidmax) {
if (reset_one (uid)) { if (reset_one (uid)) {
errors = true; errors = true;
}
uid++;
} }
uid++;
}
} else { } else {
/* Only reset records for existing users. /* Only reset records for existing users.
*/ */
@ -392,32 +392,32 @@ static void setmax (int max)
* entries will be created. * entries will be created.
*/ */
if (aflg) { if (aflg) {
/* Entries for non existing user are also taken into /* Entries for non existing user are also taken into
* account (in order to define policy for future users). * account (in order to define policy for future users).
*/ */
uid_t uid = 0; uid_t uid = 0;
/* The default umax value is based on the size of the /* The default umax value is based on the size of the
* faillog database. * faillog database.
*/ */
uid_t uidmax = statbuf.st_size / sizeof (struct faillog); uid_t uidmax = statbuf.st_size / sizeof (struct faillog);
if (uidmax > 1) { if (uidmax > 1) {
uidmax--; uidmax--;
} }
/* Make sure we stay in the umin-umax range if specified */ /* Make sure we stay in the umin-umax range if specified */
if (has_umin) { if (has_umin) {
uid = (uid_t)umin; uid = (uid_t)umin;
} }
if (has_umax) { if (has_umax) {
uidmax = (uid_t)umax; uidmax = (uid_t)umax;
} }
while (uid <= uidmax) { while (uid <= uidmax) {
if (setmax_one (uid, max)) { if (setmax_one (uid, max)) {
errors = true; errors = true;
}
uid++;
} }
uid++;
}
} else { } else {
/* Only change records for existing users. /* Only change records for existing users.
*/ */
@ -509,32 +509,32 @@ static void set_locktime (long locktime)
* entries will be created. * entries will be created.
*/ */
if (aflg) { if (aflg) {
/* Entries for non existing user are also taken into /* Entries for non existing user are also taken into
* account (in order to define policy for future users). * account (in order to define policy for future users).
*/ */
uid_t uid = 0; uid_t uid = 0;
/* The default umax value is based on the size of the /* The default umax value is based on the size of the
* faillog database. * faillog database.
*/ */
uid_t uidmax = statbuf.st_size / sizeof (struct faillog); uid_t uidmax = statbuf.st_size / sizeof (struct faillog);
if (uidmax > 1) { if (uidmax > 1) {
uidmax--; uidmax--;
} }
/* Make sure we stay in the umin-umax range if specified */ /* Make sure we stay in the umin-umax range if specified */
if (has_umin) { if (has_umin) {
uid = (uid_t)umin; uid = (uid_t)umin;
} }
if (has_umax) { if (has_umax) {
uidmax = (uid_t)umax; uidmax = (uid_t)umax;
} }
while (uid <= uidmax) { while (uid <= uidmax) {
if (set_locktime_one (uid, locktime)) { if (set_locktime_one (uid, locktime)) {
errors = true; errors = true;
}
uid++;
} }
uid++;
}
} else { } else {
/* Only change records for existing users. /* Only change records for existing users.
*/ */