summaryrefslogtreecommitdiffstats
path: root/include/resolv.h
diff options
context:
space:
mode:
authoravsm <avsm@openbsd.org>2003-08-01 17:38:33 +0000
committeravsm <avsm@openbsd.org>2003-08-01 17:38:33 +0000
commit89b95c1c6ce2753bf90589b3c2c7f8be8010fad2 (patch)
tree1bd89fd6b221da04e42bebc98d6b5cc15cd8e9ea /include/resolv.h
parentwhen the -R option (read-only) is specified, there is no need to print (diff)
downloadwireguard-openbsd-89b95c1c6ce2753bf90589b3c2c7f8be8010fad2.tar.xz
wireguard-openbsd-89b95c1c6ce2753bf90589b3c2c7f8be8010fad2.zip
add __bounded__ attributes for userland headers; enabled with -Wbounded
ok deraadt@
Diffstat (limited to 'include/resolv.h')
-rw-r--r--include/resolv.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/include/resolv.h b/include/resolv.h
index 7a11eb31d00..7ce9726abb3 100644
--- a/include/resolv.h
+++ b/include/resolv.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: resolv.h,v 1.13 2003/06/26 19:34:17 avsm Exp $ */
+/* $OpenBSD: resolv.h,v 1.14 2003/08/01 17:38:33 avsm Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -333,13 +333,19 @@ int dn_expand(const u_char *, const u_char *, const u_char *,
char *, int);
int res_init(void);
u_int res_randomid(void);
-int res_query(const char *, int, int, u_char *, int);
-int res_search(const char *, int, int, u_char *, int);
+int res_query(const char *, int, int, u_char *, int)
+ __attribute__((__bounded__(__string__,4,5)));
+int res_search(const char *, int, int, u_char *, int)
+ __attribute__((__bounded__(__string__,4,5)));
int res_querydomain(const char *, const char *, int, int,
- u_char *, int);
+ u_char *, int)
+ __attribute__((__bounded__(__string__,5,6)));
int res_mkquery(int, const char *, int, int, const u_char *, int,
- const u_char *, u_char *, int);
-int res_send(const u_char *, int, u_char *, int);
+ const u_char *, u_char *, int)
+ __attribute__((__bounded__(__string__,5,6)))
+ __attribute__((__bounded__(__string__,8,9)));
+int res_send(const u_char *, int, u_char *, int)
+ __attribute__((__bounded__(__string__,3,4)));
int res_isourserver(const struct sockaddr_in *);
int res_nameinquery(const char *, int, int,
const u_char *, const u_char *);