projects
/
platform
/
upstream
/
libsoup.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f10591c
)
Add warning in a "can't happen" case
author
Benjamin Otte
<otte@gnome.org>
Mon, 17 Aug 2009 17:29:17 +0000
(19:29 +0200)
committer
Benjamin Otte
<otte@gnome.org>
Thu, 20 Aug 2009 18:07:53 +0000
(20:07 +0200)
This is mostly to indicate that we did not forget error checking.
libsoup/soup-address.c
patch
|
blob
|
history
diff --git
a/libsoup/soup-address.c
b/libsoup/soup-address.c
index
043bac2
..
0aa0547
100644
(file)
--- a/
libsoup/soup-address.c
+++ b/
libsoup/soup-address.c
@@
-566,7
+566,11
@@
update_addrs (SoupAddress *addr, GList *addrs, GError *error)
len = g_socket_address_get_native_size (gsa);
priv->sockaddr = g_malloc (len);
- g_socket_address_to_native (gsa, priv->sockaddr, len, NULL);
+ if (!g_socket_address_to_native (gsa, priv->sockaddr, len, NULL)) {
+ /* can't happen: We know the address format is supported
+ * and the buffer is large enough */
+ g_warn_if_reached ();
+ }
return SOUP_STATUS_OK;
}