Re: [systemd-devel] [PATCH 1/3] log: 1237557 Unchecked return value from library

2014-12-03 Thread Lennart Poettering
On Mon, 17.11.14 10:58, David Herrmann (dh.herrm...@gmail.com) wrote:

 Hi
 
 On Tue, Nov 11, 2014 at 9:06 AM, Susant Sahani sus...@redhat.com wrote:
  fix 1237557 Unchecked return value from library
  ---
   src/shared/log.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
 
  diff --git a/src/shared/log.c b/src/shared/log.c
  index 1c589ac..e7237ba 100644
  --- a/src/shared/log.c
  +++ b/src/shared/log.c
  @@ -122,7 +122,7 @@ static int create_log_socket(int type) {
   timeval_store(tv, 10 * USEC_PER_MSEC);
   else
   timeval_store(tv, 10 * USEC_PER_SEC);
  -setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, tv, sizeof(tv));
  +(void) setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, tv, sizeof(tv));
 
 I don't think we use spaces after casts, but not entirely sure..

I usually put a space there. And I'd recommend doing that, but we
don't follow that strictly, and either is acceptable.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 1/3] log: 1237557 Unchecked return value from library

2014-11-17 Thread David Herrmann
Hi

On Tue, Nov 11, 2014 at 9:06 AM, Susant Sahani sus...@redhat.com wrote:
 fix 1237557 Unchecked return value from library
 ---
  src/shared/log.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/src/shared/log.c b/src/shared/log.c
 index 1c589ac..e7237ba 100644
 --- a/src/shared/log.c
 +++ b/src/shared/log.c
 @@ -122,7 +122,7 @@ static int create_log_socket(int type) {
  timeval_store(tv, 10 * USEC_PER_MSEC);
  else
  timeval_store(tv, 10 * USEC_PER_SEC);
 -setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, tv, sizeof(tv));
 +(void) setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, tv, sizeof(tv));

I don't think we use spaces after casts, but not entirely sure..

Applied!

Thanks
David


  return fd;
  }
 --
 2.1.0

 ___
 systemd-devel mailing list
 systemd-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 1/3] log: 1237557 Unchecked return value from library

2014-11-11 Thread Susant Sahani
fix 1237557 Unchecked return value from library
---
 src/shared/log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/shared/log.c b/src/shared/log.c
index 1c589ac..e7237ba 100644
--- a/src/shared/log.c
+++ b/src/shared/log.c
@@ -122,7 +122,7 @@ static int create_log_socket(int type) {
 timeval_store(tv, 10 * USEC_PER_MSEC);
 else
 timeval_store(tv, 10 * USEC_PER_SEC);
-setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, tv, sizeof(tv));
+(void) setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, tv, sizeof(tv));
 
 return fd;
 }
-- 
2.1.0

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel