diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-09-12 04:55:06 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2014-09-15 13:56:57 -0400 |
commit | 69046e28fcdf42ecbbe777f080fff9656e242ed4 (patch) | |
tree | b5c516adda0e458b1776ceab4fe8584e399b97e5 /support | |
parent | f1816585555b8505c04375818ccfb797202d1f84 (diff) | |
download | nfs-utils-69046e28fcdf42ecbbe777f080fff9656e242ed4.tar.gz nfs-utils-69046e28fcdf42ecbbe777f080fff9656e242ed4.tar.xz nfs-utils-69046e28fcdf42ecbbe777f080fff9656e242ed4.zip |
replace __attribute_malloc__ with the more portable __attribute__((__malloc__))
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support')
-rw-r--r-- | support/export/hostname.c | 14 | ||||
-rw-r--r-- | support/include/exportfs.h | 10 | ||||
-rw-r--r-- | support/nfs/svc_create.c | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/support/export/hostname.c b/support/export/hostname.c index 3e949a1..ad595d1 100644 --- a/support/export/hostname.c +++ b/support/export/hostname.c @@ -91,7 +91,7 @@ host_ntop(const struct sockaddr *sap, char *buf, const size_t buflen) * Returns address info structure, or NULL if an error occurs. Caller * must free the returned structure with freeaddrinfo(3). */ -__attribute_malloc__ +__attribute__((__malloc__)) struct addrinfo * host_pton(const char *paddr) { @@ -153,7 +153,7 @@ host_pton(const char *paddr) * if no information is available for @hostname. Caller must free the * returned structure with freeaddrinfo(3). */ -__attribute_malloc__ +__attribute__((__malloc__)) struct addrinfo * host_addrinfo(const char *hostname) { @@ -199,7 +199,7 @@ host_addrinfo(const char *hostname) * the string. */ #ifdef HAVE_GETNAMEINFO -__attribute_malloc__ +__attribute__((__malloc__)) char * host_canonname(const struct sockaddr *sap) { @@ -234,7 +234,7 @@ host_canonname(const struct sockaddr *sap) return strdup(buf); } #else /* !HAVE_GETNAMEINFO */ -__attribute_malloc__ +__attribute__((__malloc__)) char * host_canonname(const struct sockaddr *sap) { @@ -266,7 +266,7 @@ host_canonname(const struct sockaddr *sap) * * Caller must free the returned structure with freeaddrinfo(3). */ -__attribute_malloc__ +__attribute__((__malloc__)) struct addrinfo * host_reliable_addrinfo(const struct sockaddr *sap) { @@ -313,7 +313,7 @@ out_free_hostname: * Caller must free the returned structure with freeaddrinfo(3). */ #ifdef HAVE_GETNAMEINFO -__attribute_malloc__ +__attribute__((__malloc__)) struct addrinfo * host_numeric_addrinfo(const struct sockaddr *sap) { @@ -361,7 +361,7 @@ host_numeric_addrinfo(const struct sockaddr *sap) return ai; } #else /* !HAVE_GETNAMEINFO */ -__attribute_malloc__ +__attribute__((__malloc__)) struct addrinfo * host_numeric_addrinfo(const struct sockaddr *sap) { diff --git a/support/include/exportfs.h b/support/include/exportfs.h index 97b2327..9021fae 100644 --- a/support/include/exportfs.h +++ b/support/include/exportfs.h @@ -156,15 +156,15 @@ int secinfo_addflavor(struct flav_info *, struct exportent *); char * host_ntop(const struct sockaddr *sap, char *buf, const size_t buflen); -__attribute_malloc__ +__attribute__((__malloc__)) struct addrinfo * host_pton(const char *paddr); -__attribute_malloc__ +__attribute__((__malloc__)) struct addrinfo * host_addrinfo(const char *hostname); -__attribute_malloc__ +__attribute__((__malloc__)) char * host_canonname(const struct sockaddr *sap); -__attribute_malloc__ +__attribute__((__malloc__)) struct addrinfo * host_reliable_addrinfo(const struct sockaddr *sap); -__attribute_malloc__ +__attribute__((__malloc__)) struct addrinfo * host_numeric_addrinfo(const struct sockaddr *sap); int rmtab_read(void); diff --git a/support/nfs/svc_create.c b/support/nfs/svc_create.c index 6b9e85b..a706f87 100644 --- a/support/nfs/svc_create.c +++ b/support/nfs/svc_create.c @@ -113,7 +113,7 @@ svc_create_find_xprt(const struct sockaddr *bindaddr, const struct netconfig *nc * * Otherwise NULL is returned if an error occurs. */ -__attribute_malloc__ +__attribute__((__malloc__)) static struct addrinfo * svc_create_bindaddr(struct netconfig *nconf, const uint16_t port) { |