public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Remove nonnull from realpath
@ 2004-12-01 10:48 Jakub Jelinek
  2004-12-01 19:54 ` Roland McGrath
  0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2004-12-01 10:48 UTC (permalink / raw)
  To: Ulrich Drepper, Roland McGrath; +Cc: Glibc hackers

Hi!

http://www.opengroup.org/onlinepubs/009695399/functions/realpath.html
says that realpath (NULL, something) should NULL and set errno to
EINVAL.  Therefore calling this function with NULL argument is not
undefined behaviour and nonnull attribute is not appropriate.
test-canon.c: In function `do_test':
test-canon.c:128: warning: null argument where non-null required (arg 1)

2004-12-01  Jakub Jelinek  <jakub@redhat.com>

	* stdlib/stdlib.h (realpath): Remove nonnull attribute.

--- libc/stdlib/stdlib.h.jj	2004-11-26 10:16:32.000000000 +0100
+++ libc/stdlib/stdlib.h	2004-12-01 11:44:12.721671011 +0100
@@ -747,7 +747,7 @@ extern char *canonicalize_file_name (__c
    ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, returns the
    name in RESOLVED.  */
 extern char *realpath (__const char *__restrict __name,
-		       char *__restrict __resolved) __THROW __nonnull ((1));
+		       char *__restrict __resolved) __THROW;
 #endif
 
 

	Jakub

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

* Re: [PATCH] Remove nonnull from realpath
  2004-12-01 10:48 [PATCH] Remove nonnull from realpath Jakub Jelinek
@ 2004-12-01 19:54 ` Roland McGrath
  0 siblings, 0 replies; 2+ messages in thread
From: Roland McGrath @ 2004-12-01 19:54 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Ulrich Drepper, Glibc hackers

> 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* stdlib/stdlib.h (realpath): Remove nonnull attribute.

Applied.


Thanks,
Roland

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

end of thread, other threads:[~2004-12-01 19:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-01 10:48 [PATCH] Remove nonnull from realpath Jakub Jelinek
2004-12-01 19:54 ` Roland McGrath

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).