From 8d361f9d57c88fa5153d04a72538916812189732 Mon Sep 17 00:00:00 2001 From: erickson Date: Thu, 31 May 2007 03:33:06 +0000 Subject: [PATCH] removed some error lines printed to stderr. not used and they also have the potential of overwriteing errno git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@929 9efc2488-bf62-4759-914b-345cdb29e865 --- src/utils/utils.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/utils/utils.c b/src/utils/utils.c index 6949344..3282b9f 100644 --- a/src/utils/utils.c +++ b/src/utils/utils.c @@ -65,17 +65,14 @@ int set_fl( int fd, int flags ) { int val; - if( (val = fcntl( fd, F_GETFL, 0) ) < 0 ) { - fprintf(stderr, "fcntl F_GETFL error"); + if( (val = fcntl( fd, F_GETFL, 0) ) < 0 ) return -1; - } val |= flags; - if( fcntl( fd, F_SETFL, val ) < 0 ) { - fprintf(stderr, "fcntl F_SETFL error"); + if( fcntl( fd, F_SETFL, val ) < 0 ) return -1; - } + return 0; } @@ -83,17 +80,14 @@ int clr_fl( int fd, int flags ) { int val; - if( (val = fcntl( fd, F_GETFL, 0) ) < 0 ) { - fprintf(stderr, "fcntl F_GETFL error" ); + if( (val = fcntl( fd, F_GETFL, 0) ) < 0 ) return -1; - } val &= ~flags; - if( fcntl( fd, F_SETFL, val ) < 0 ) { - fprintf( stderr, "fcntl F_SETFL error" ); + if( fcntl( fd, F_SETFL, val ) < 0 ) return -1; - } + return 0; } -- 2.11.0