summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-10-15 12:14:12 +1100
committerDamien Miller <djm@mindrot.org>2013-10-15 12:14:12 +1100
commite9fc72edd6c313b670558cd5219601c38a949b67 (patch)
tree32ed93978e93622d5829a55cbc0479e00b1161bf /misc.c
parent194fd904d8597a274b93e075b2047afdf5a175d4 (diff)
- djm@cvs.openbsd.org 2013/10/14 23:28:23
[canohost.c misc.c misc.h readconf.c sftp-server.c ssh.c] refactor client config code a little: add multistate option partsing to readconf.c, similar to servconf.c's existing code. move checking of options that accept "none" as an argument to readconf.c add a lowercase() function and use it instead of explicit tolower() in loops part of a larger diff that was ok markus@
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index c3c809943..e4c8c3238 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.c,v 1.91 2013/07/12 00:43:50 djm Exp $ */ 1/* $OpenBSD: misc.c,v 1.92 2013/10/14 23:28:23 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved. 4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -43,6 +43,7 @@
43#include <netinet/ip.h> 43#include <netinet/ip.h>
44#include <netinet/tcp.h> 44#include <netinet/tcp.h>
45 45
46#include <ctype.h>
46#include <errno.h> 47#include <errno.h>
47#include <fcntl.h> 48#include <fcntl.h>
48#include <netdb.h> 49#include <netdb.h>
@@ -1017,6 +1018,13 @@ iptos2str(int iptos)
1017 snprintf(iptos_str, sizeof iptos_str, "0x%02x", iptos); 1018 snprintf(iptos_str, sizeof iptos_str, "0x%02x", iptos);
1018 return iptos_str; 1019 return iptos_str;
1019} 1020}
1021
1022void
1023lowercase(char *s)
1024{
1025 for (; *s; s++)
1026 *s = tolower((u_char)*s);
1027}
1020void 1028void
1021sock_set_v6only(int s) 1029sock_set_v6only(int s)
1022{ 1030{