From 191b7dbd88f4863f6cf4699bb70ad07bfdc4e4b2 Mon Sep 17 00:00:00 2001
From: Thomas Chou <thomas@wytron.com.tw>
Date: Sun, 2 Dec 2007 16:29:30 +0800
Subject: [PATCH] boa: replace legacy bcopy/bzero/bcmp/index/rindex

bcopy/bzero/bcmp/index/rindex are marked LEGACY in SuSv3.
They are replaced as proposed by SuSv3.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
 user/boa/src/auth.c   |    3 ++-
 user/boa/src/config.c |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/user/boa/src/auth.c b/user/boa/src/auth.c
index 28e2f0b..1da75bf 100644
--- a/user/boa/src/auth.c
+++ b/user/boa/src/auth.c
@@ -21,6 +21,7 @@
 
 #include <stdio.h>
 #include <fcntl.h>
+#include <string.h>
 #ifdef __UC_LIBC__
 #include <unistd.h>
 #else
@@ -355,7 +356,7 @@ int auth_authorize(request * req)
 							syslog(LOG_ERR, "Authentication attempt failed for %s from %s because: Invalid Username\n",
 									auth_userpass, req->remote_ip_addr);
 					}
-					bzero(current_client, sizeof(current_client));
+					memset(current_client, 0, sizeof(current_client));
 					send_r_unauthorized(req,server_name);
 					return 0;
 				}
diff --git a/user/boa/src/config.c b/user/boa/src/config.c
index dc222a9..9ad3d8a 100644
--- a/user/boa/src/config.c
+++ b/user/boa/src/config.c
@@ -322,7 +322,7 @@ embedparse(FILE *fp)
 	if (fp == NULL)
 		return(-1);
 	
-	bzero(arg, sizeof(arg));
+	memset(arg, 0, sizeof(arg));
 	
 	line = 0;
 	while (fgets(buf, sizeof(buf), fp)) {
-- 
1.5.3.3

