diff options
author | Ludovic Courtès <ludo@gnu.org> | 2010-02-15 18:42:34 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2010-02-15 18:42:34 +0100 |
commit | 3474222a65b7d4cc02b43bcd8abcadbc7ec5258f (patch) | |
tree | efa8fc4bbb6c3a1904cc895accb719a8388a2f3f /libguile/net_db.c | |
parent | 25bc75c4316497c95b1c3fc17f1678ac47d32041 (diff) | |
download | guile-3474222a65b7d4cc02b43bcd8abcadbc7ec5258f.tar.gz |
Use `#f' for `addrinfo:canonname' when it wasn't supplied by getaddrinfo(3).
* libguile/net_db.c (scm_from_addrinfo): Use `#f' when `ai_canonname'
isn't set.
Diffstat (limited to 'libguile/net_db.c')
-rw-r--r-- | libguile/net_db.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libguile/net_db.c b/libguile/net_db.c index ca6dafb28..bcba18ebd 100644 --- a/libguile/net_db.c +++ b/libguile/net_db.c @@ -1,5 +1,5 @@ /* "net_db.c" network database support - * Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2006, 2009 Free Software Foundation, Inc. + * Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2006, 2009, 2010 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -493,7 +493,10 @@ scm_from_addrinfo (const struct addrinfo *c_ai) SCM_SIMPLE_VECTOR_SET (ai, 3, scm_from_int (c_ai->ai_protocol)); SCM_SIMPLE_VECTOR_SET (ai, 4, scm_from_sockaddr (c_ai->ai_addr, c_ai->ai_addrlen)); - SCM_SIMPLE_VECTOR_SET (ai, 5, scm_from_locale_string (c_ai->ai_canonname)); + SCM_SIMPLE_VECTOR_SET (ai, 5, + c_ai->ai_canonname != NULL + ? scm_from_locale_string (c_ai->ai_canonname) + : SCM_BOOL_F); return ai; } |