summaryrefslogtreecommitdiffhomepage
path: root/src/utils.c
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2002-04-16 03:22:16 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2002-04-16 03:22:16 +0000
commit04da777bed49dbacdbc0d57c34365f354f1671b8 (patch)
tree91f58c866cbda0afaa286f50dca0e14bb1c84c90 /src/utils.c
parent0e4436a07044be08b4f35f132e0b27c775609b73 (diff)
Removed the duplicate calls to strlen().
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/utils.c b/src/utils.c
index 4d98c5f..ec6d551 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.24 2002-04-15 04:13:14 rjkaes Exp $
+/* $Id: utils.c,v 1.25 2002-04-16 03:22:16 rjkaes Exp $
*
* Misc. routines which are used by the various functions to handle strings
* and memory allocation and pretty much anything else we can think of. Also,
@@ -88,6 +88,7 @@ send_http_message(struct conn_s *connptr, int http_code,
char timebuf[30];
time_t global_time;
+ size_t message_len = strlen(message);
global_time = time(NULL);
strftime(timebuf, sizeof(timebuf), "%a, %d %b %Y %H:%M:%S GMT",
@@ -96,11 +97,9 @@ send_http_message(struct conn_s *connptr, int http_code,
write_message(connptr->client_fd,
headers,
http_code, error_title, PACKAGE, VERSION, timebuf,
- strlen(message));
+ message_len);
- safe_write(connptr->client_fd, message, strlen(message));
-
- return 0;
+ return safe_write(connptr->client_fd, message, message_len);
}
/*