public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix clock_settime
@ 2004-02-26 21:08 Jakub Jelinek
  2004-02-26 21:36 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2004-02-26 21:08 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Glibc hackers

Hi!

This patch fixes:

../sysdeps/unix/clock_settime.c: In function `clock_settime':
../sysdeps/unix/clock_settime.c:43: warning: `retval' might be used uninitialized in this function

warnings, which were correct in this case.

2004-02-26  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/clock_settime.c (SYSDEP_SETTIME): Set
	retval to -1 on error.

--- libc/sysdeps/unix/sysv/linux/clock_settime.c.jj	2003-03-03 05:49:24.000000000 +0100
+++ libc/sysdeps/unix/sysv/linux/clock_settime.c	2004-02-26 21:52:06.249044328 +0100
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -60,7 +60,10 @@ extern int __libc_missing_posix_timers a
       if (e == EINVAL && clock_id == CLOCK_REALTIME)			      \
 	HANDLE_REALTIME;						      \
       else								      \
-	__set_errno (e);						      \
+	{								      \
+	  __set_errno (e);						      \
+	  retval = -1;							      \
+	}								      \
     }									      \
     break
 #endif


	Jakub

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix clock_settime
  2004-02-26 21:08 [PATCH] Fix clock_settime Jakub Jelinek
@ 2004-02-26 21:36 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2004-02-26 21:36 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Glibc hackers

Applied.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-02-26 21:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-26 21:08 [PATCH] Fix clock_settime Jakub Jelinek
2004-02-26 21:36 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).