diff options
Diffstat (limited to '')
-rw-r--r-- | url.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: url.c,v 1.29 2002/01/07 16:28:17 ukai Exp $ */ +/* $Id: url.c,v 1.30 2002/01/10 15:39:21 ukai Exp $ */ #include "fm.h" #include <sys/types.h> #include <sys/socket.h> @@ -626,8 +626,8 @@ openSocket(char *const hostname, #endif goto error; } - regexCompile("^[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*$", 0); - if (regexMatch(hostname, 0, 1)) { + regexCompile("^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$", 0); + if (regexMatch(hostname, -1, 1)) { sscanf(hostname, "%d.%d.%d.%d", &a1, &a2, &a3, &a4); adr = htonl((a1 << 24) | (a2 << 16) | (a3 << 8) | a4); bcopy((void *)&adr, (void *)&hostaddr.sin_addr, sizeof(long)); |