From: erickson Date: Thu, 31 May 2007 03:33:06 +0000 (+0000) Subject: removed some error lines printed to stderr. not used and they also have the potentia... X-Git-Tag: osrf_rel_2_0_1~983 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8d361f9d57c88fa5153d04a72538916812189732;p=OpenSRF.git 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 --- 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; }