summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-05-13 13:25:14 +0200
committerAndy Wingo <wingo@pobox.com>2011-05-13 15:31:13 +0200
commit6ef437665cfcf1d2aca96833a7495c9d7bd5ae90 (patch)
tree9c1d56e8a07d018c6aca6173789935916e1377a6
parent34297700953a200e8a6a163b8a6a53e6ccf31173 (diff)
downloadguile-6ef437665cfcf1d2aca96833a7495c9d7bd5ae90.tar.gz
compile-time assertion in net_db uses constant expressions
* libguile/net_db.c: Use constant expressions for EAI_BADFLAGS and AI_ALL representations.
-rw-r--r--libguile/net_db.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/net_db.c b/libguile/net_db.c
index 14722d516..61dd2f386 100644
--- a/libguile/net_db.c
+++ b/libguile/net_db.c
@@ -457,7 +457,7 @@ SCM_DEFINE (scm_setserv, "setserv", 0, 1, 0,
SCM_SYMBOL (sym_getaddrinfo_error, "getaddrinfo-error");
/* Make sure the `AI_*' flags can be stored as INUMs. */
-verify (SCM_I_INUM (SCM_I_MAKINUM (AI_ALL)) == AI_ALL);
+verify (AI_ALL < SCM_MOST_POSITIVE_FIXNUM);
/* Valid values for the `ai_flags' to `struct addrinfo'. */
SCM_VARIABLE_INIT (sym_ai_passive, "AI_PASSIVE",
@@ -677,7 +677,7 @@ SCM_DEFINE (scm_getaddrinfo, "getaddrinfo", 1, 5, 0,
#undef FUNC_NAME
/* Make sure the `EAI_*' flags can be stored as INUMs. */
-verify (SCM_I_INUM (SCM_I_MAKINUM (EAI_BADFLAGS)) == EAI_BADFLAGS);
+verify (EAI_BADFLAGS < SCM_MOST_POSITIVE_FIXNUM);
/* Error codes returned by `getaddrinfo'. */
SCM_VARIABLE_INIT (sym_eai_badflags, "EAI_BADFLAGS",