diff options
author | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2003-08-01 17:38:34 +0000 |
---|---|---|
committer | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2003-08-01 17:38:34 +0000 |
commit | d68eb8fee6d53373bd6305628015b381d50e5a81 (patch) | |
tree | 1a024d606a1af2da709084dc790f2510d6665ae6 /include/arpa/inet.h | |
parent | 594ac08ee4888800f45f3229059b0bcb5d56b45f (diff) |
add __bounded__ attributes for userland headers; enabled with -Wbounded
ok deraadt@
Diffstat (limited to 'include/arpa/inet.h')
-rw-r--r-- | include/arpa/inet.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/arpa/inet.h b/include/arpa/inet.h index a7212a6a457..63c42ac4111 100644 --- a/include/arpa/inet.h +++ b/include/arpa/inet.h @@ -1,4 +1,4 @@ -/* $OpenBSD: inet.h,v 1.8 2003/06/26 19:34:17 avsm Exp $ */ +/* $OpenBSD: inet.h,v 1.9 2003/08/01 17:38:33 avsm Exp $ */ /* * ++Copyright++ 1983, 1993 @@ -74,14 +74,18 @@ in_addr_t inet_addr(const char *); int inet_aton(const char *, struct in_addr *); in_addr_t inet_lnaof(struct in_addr); struct in_addr inet_makeaddr(in_addr_t , in_addr_t); -char * inet_neta(in_addr_t, char *, size_t); +char * inet_neta(in_addr_t, char *, size_t) + __attribute__((__bounded__(__string__,2,3))); in_addr_t inet_netof(struct in_addr); in_addr_t inet_network(const char *); -char *inet_net_ntop(int, const void *, int, char *, size_t); -int inet_net_pton(int, const char *, void *, size_t); +char *inet_net_ntop(int, const void *, int, char *, size_t) + __attribute__((__bounded__(__string__,4,5))); +int inet_net_pton(int, const char *, void *, size_t) + __attribute__((__bounded__(__string__,3,4))); char *inet_ntoa(struct in_addr); int inet_pton(int, const char *, void *); -const char *inet_ntop(int, const void *, char *, size_t); +const char *inet_ntop(int, const void *, char *, size_t) + __attribute__ ((__bounded__(__string__,3,4))); u_int inet_nsap_addr(const char *, u_char *, int); char *inet_nsap_ntoa(int, const u_char *, char *); __END_DECLS |