summaryrefslogtreecommitdiff
path: root/systemd/_daemon.c
diff options
context:
space:
mode:
authorSimon Farnsworth <simon.farnsworth@onelan.co.uk>2015-03-25 17:00:09 +0000
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-07-05 14:19:22 -0400
commitd6c4257815a7d231aa55d4fa88d6cb374d98c3e8 (patch)
treedb1550348c39bf9d8dc0cd95e90378ca1065e5a5 /systemd/_daemon.c
parent7ea37c0d40bb23e44777925207dd4338037861f7 (diff)
downloadpython-systemd-d6c4257815a7d231aa55d4fa88d6cb374d98c3e8.tar.gz
python-systemd: fix is_socket_inet to cope with ports
Just a couple of trivial oversights.
Diffstat (limited to 'systemd/_daemon.c')
-rw-r--r--systemd/_daemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/systemd/_daemon.c b/systemd/_daemon.c
index 65cfec7..7c5f1b2 100644
--- a/systemd/_daemon.c
+++ b/systemd/_daemon.c
@@ -225,7 +225,7 @@ static PyObject* is_socket_inet(PyObject *self, PyObject *args) {
&fd, &family, &type, &listening, &port))
return NULL;
- if (port < 0 || port > INT16_MAX) {
+ if (port < 0 || port > UINT16_MAX) {
set_error(-EINVAL, NULL, "port must fit into uint16_t");
return NULL;
}