summaryrefslogtreecommitdiffstats
path: root/src/datatype.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/datatype.c')
-rw-r--r--src/datatype.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/datatype.c b/src/datatype.c
index 3eec931b..12e876cf 100644
--- a/src/datatype.c
+++ b/src/datatype.c
@@ -525,7 +525,7 @@ static struct error_record *inet_service_type_parse(const struct expr *sym,
if (errno == ERANGE || i > UINT16_MAX)
return error(&sym->location, "Service out of range");
- port = i;
+ port = htons(i);
} else {
err = getaddrinfo(NULL, sym->identifier, NULL, &ai);
if (err != 0)