1
0
forked from rpms/rpcbind
rpcbind/rpcbind-0.2.2-warmstart.patch
Steve Dickson aad80f7260 Fixed NULL fp problem remove error message on warmstart patch
Signed-off-by: Steve Dickson <steved@redhat.com>
2014-12-17 10:31:39 -05:00

32 lines
1012 B
Diff

commit 52fbdcba91df95ef342949a958f00bc0470f5777
Author: Thorsten Kukuk <kukuk@suse.com>
Date: Wed Dec 17 10:25:33 2014 -0500
rpcbind: remove error message on warmstart
Don't print an error message on warmstart if the
startup files don't exist (take two)
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/src/warmstart.c b/src/warmstart.c
index 85ecf96..b6eb73e 100644
--- a/src/warmstart.c
+++ b/src/warmstart.c
@@ -105,10 +105,11 @@ read_struct(char *filename, xdrproc_t structproc, void *list)
if (debugging)
fprintf(stderr, "rpcbind: using '%s' startup file\n", filename);
- if (((fp = fopen(filename, "r")) == NULL) && errno != ENOENT) {
- syslog(LOG_ERR,
- "Cannot open '%s' file for reading, errno %d (%s)",
- filename, errno, strerror(errno));
+ if ((fp = fopen(filename, "r")) == NULL) {
+ if (errno != ENOENT)
+ syslog(LOG_ERR,
+ "Cannot open '%s' file for reading, errno %d (%s)",
+ filename, errno, strerror(errno));
goto error;
}