diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-09-07 09:55:30 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-09-07 09:55:30 +0000 |
commit | 54515b3626c51e708924240512446a2f0ed42cf6 (patch) | |
tree | a217db29d3a99855366f61f0e7fcb871fada6025 /usr.bin/nc/netcat.c | |
parent | d12a8164692a535aeeb9d60bbda2fd462581262b (diff) |
Declare strings passed to local_listen() as const. This makes it
consistent to remote_connect() and getaddrinfo(3).
from Nan Xiao
Diffstat (limited to 'usr.bin/nc/netcat.c')
-rw-r--r-- | usr.bin/nc/netcat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c index e02ddd63362..341e7e50485 100644 --- a/usr.bin/nc/netcat.c +++ b/usr.bin/nc/netcat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.193 2018/09/06 13:23:02 bluhm Exp $ */ +/* $OpenBSD: netcat.c,v 1.194 2018/09/07 09:55:29 bluhm Exp $ */ /* * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> * Copyright (c) 2015 Bob Beck. All rights reserved. @@ -122,7 +122,7 @@ void atelnet(int, unsigned char *, unsigned int); int strtoport(char *portstr, int udp); void build_ports(char *); void help(void) __attribute__((noreturn)); -int local_listen(char *, char *, struct addrinfo); +int local_listen(const char *, const char *, struct addrinfo); void readwrite(int, struct tls *); void fdpass(int nfd) __attribute__((noreturn)); int remote_connect(const char *, const char *, struct addrinfo); @@ -994,7 +994,7 @@ timeout_connect(int s, const struct sockaddr *name, socklen_t namelen) * address. Returns -1 on failure. */ int -local_listen(char *host, char *port, struct addrinfo hints) +local_listen(const char *host, const char *port, struct addrinfo hints) { struct addrinfo *res, *res0; int s = -1, ret, x = 1, save_errno; |