From 1e0450dfb1bb898fe61ce1c823486d4a048f9605 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Fri, 18 May 2012 19:32:32 +0000 Subject: [PATCH] * src/pwunconv.c: Do not check spw_close() return value (file is opened readonly). * src/grpunconv.c: Do not check sgr_close() return value (file is opened readonly). --- ChangeLog | 7 +++++++ src/grpunconv.c | 8 +------- src/pwunconv.c | 8 +------- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index c610a284..730796b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-05-18 Nicolas François + + * src/pwunconv.c: Do not check spw_close() return value (file is + opened readonly). + * src/grpunconv.c: Do not check sgr_close() return value (file is + opened readonly). + 2012-05-18 Nicolas François * NEWS, src/userdel.c: Fix segfault when userdel removes the diff --git a/src/grpunconv.c b/src/grpunconv.c index 79c7d956..ea8914cb 100644 --- a/src/grpunconv.c +++ b/src/grpunconv.c @@ -205,13 +205,7 @@ int main (int argc, char **argv) } } - if (sgr_close () == 0) { - fprintf (stderr, - _("%s: failure while writing changes to %s\n"), - Prog, sgr_dbname ()); - SYSLOG ((LOG_ERR, "failure while writing changes to %s", sgr_dbname ())); - fail_exit (3); - } + (void) sgr_close (); /* was only open O_RDONLY */ if (gr_close () == 0) { fprintf (stderr, diff --git a/src/pwunconv.c b/src/pwunconv.c index c136ed40..4c3c6e5b 100644 --- a/src/pwunconv.c +++ b/src/pwunconv.c @@ -221,13 +221,7 @@ int main (int argc, char **argv) } } - if (spw_close () == 0) { - fprintf (stderr, - _("%s: failure while writing changes to %s\n"), - Prog, spw_dbname ()); - SYSLOG ((LOG_ERR, "failure while writing changes to %s", spw_dbname ())); - fail_exit (3); - } + (void) spw_close (); /* was only open O_RDONLY */ if (pw_close () == 0) { fprintf (stderr,