summaryrefslogtreecommitdiff
path: root/ot_accesslist.c
diff options
context:
space:
mode:
authorerdgeist <>2008-12-06 18:46:00 +0000
committererdgeist <>2008-12-06 18:46:00 +0000
commit08c71627839a9134367db354c8255f7a720e1ff3 (patch)
treeb429abf6b3c26c7f851b522f5d4fb6797ad02d29 /ot_accesslist.c
parenta4ed31d517f77a21afe12918a9cb256489daac74 (diff)
Renamed OT_FLAG to OT_PEERFLAG to make code easier to read
Introduced READ16/32 and WRITE16/32 makros to abstract loading/storing from unaligned addresses away on cpu's that can actually load/store everywhere Removed all unnecessary memmoves, especially where it only moved 6 bytes in inner loop. I replaced them with WRITE16/32(READ16/32()) makros
Diffstat (limited to 'ot_accesslist.c')
-rw-r--r--ot_accesslist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ot_accesslist.c b/ot_accesslist.c
index d306aeb..f4c21c5 100644
--- a/ot_accesslist.c
+++ b/ot_accesslist.c
@@ -105,7 +105,7 @@ static unsigned int g_adminip_count = 0;
105int accesslist_blessip( char *ip, ot_permissions permissions ) { 105int accesslist_blessip( char *ip, ot_permissions permissions ) {
106 if( g_adminip_count >= OT_ADMINIP_MAX ) 106 if( g_adminip_count >= OT_ADMINIP_MAX )
107 return -1; 107 return -1;
108 memmove( g_adminip_addresses + g_adminip_count, ip, 4 ); 108 WRITE32(g_adminip_addresses + g_adminip_count,0,READ32(ip,0));
109 g_adminip_permissions[ g_adminip_count++ ] = permissions; 109 g_adminip_permissions[ g_adminip_count++ ] = permissions;
110#ifdef _DEBUG 110#ifdef _DEBUG
111 uint8_t *_ip = (uint8_t*)ip; 111 uint8_t *_ip = (uint8_t*)ip;