support: Handle AF_LOCAL, AF_UNSPEC in support_format_address_family

Message ID 87womkbta3.fsf@oldenburg2.str.redhat.com
State New
Headers show
Series
  • support: Handle AF_LOCAL, AF_UNSPEC in support_format_address_family
Related show

Commit Message

Florian Weimer Jan. 31, 2019, 6:01 p.m.
2019-01-31  Florian Weimer  <fweimer@redhat.com>

	* support/support_format_address_family.c
	(support_format_address_family): Handle AF_LOCAL, AF_UNSPEC.

Comments

Adhemerval Zanella Feb. 1, 2019, 11:55 a.m. | #1
On 31/01/2019 16:01, Florian Weimer wrote:
> 2019-01-31  Florian Weimer  <fweimer@redhat.com>
> 
> 	* support/support_format_address_family.c
> 	(support_format_address_family): Handle AF_LOCAL, AF_UNSPEC.

LGTM, thanks.

> 
> diff --git a/support/support_format_address_family.c b/support/support_format_address_family.c
> index cc3fb868a0..8f439d5fc4 100644
> --- a/support/support_format_address_family.c
> +++ b/support/support_format_address_family.c
> @@ -29,6 +29,10 @@ support_format_address_family (int family)
>        return xstrdup ("INET");
>      case AF_INET6:
>        return xstrdup ("INET6");
> +    case AF_LOCAL:
> +      return xstrdup ("LOCAL");
> +    case AF_UNSPEC:
> +      return xstrdup ("UNSPEC");
>      default:
>        return xasprintf ("<unknown address family %d>", family);
>      }
>

Patch

diff --git a/support/support_format_address_family.c b/support/support_format_address_family.c
index cc3fb868a0..8f439d5fc4 100644
--- a/support/support_format_address_family.c
+++ b/support/support_format_address_family.c
@@ -29,6 +29,10 @@  support_format_address_family (int family)
       return xstrdup ("INET");
     case AF_INET6:
       return xstrdup ("INET6");
+    case AF_LOCAL:
+      return xstrdup ("LOCAL");
+    case AF_UNSPEC:
+      return xstrdup ("UNSPEC");
     default:
       return xasprintf ("<unknown address family %d>", family);
     }