const unsigned int flags,
struct gc_arena *gc)
{
- struct buffer out;
+ struct buffer out = alloc_buf_gc (128, gc);
bool addr_is_defined;
if (!addr) {
return "[NULL]";
#endif
{
const int port= ntohs (addr->addr.in4.sin_port);
- out = alloc_buf_gc (128, gc);
buf_puts (&out, "[AF_INET]");
mutex_lock_static (L_INET_NTOA);
buf_puts (&out, (addr_is_defined ? inet_ntoa (addr->addr.in4.sin_addr) : "[undef]"));
{
const int port= ntohs (addr->addr.in6.sin6_port);
char buf[INET6_ADDRSTRLEN] = "[undef]";
- out = alloc_buf_gc (128, gc);
buf_puts (&out, "[AF_INET6]");
if (addr_is_defined)
{
}
}
break;
+ default:
+ ASSERT(0);
}
#endif
return BSTR (&out);