Fixed minor issues found with static code analyzis (Clang).

此提交包含在:
Jan Vidar Krey
2012-01-13 01:31:34 +01:00
父節點 0ae8a08f55
當前提交 a9b5c6db38
共有 2 個檔案被更改,包括 3 行新增 和 4 行删除
+1
查看文件
@@ -86,6 +86,7 @@ static int check_cmd_user(const char* cmd, int status, struct linked_list* list,
}
strncpy(info->nickname, data, MAX_NICK_LEN);
if (data_extra)
strncpy(info->password, data_extra, MAX_PASS_LEN);
info->credentials = status;
list_append(list, info);
-2
查看文件
@@ -203,7 +203,6 @@ int ip_mask_create_left(int af, int bits, struct ip_addr_encap* result)
fill = (128-bits) / 8;
remain_bits = (128-bits) % 8;
mask = (0xff << (8 - remain_bits));
n = 0;
for (n = 0; n < fill; n++)
((uint8_t*) &result->internal_ip_data.in6)[n] = (uint8_t) 0xff;
@@ -252,7 +251,6 @@ int ip_mask_create_right(int af, int bits, struct ip_addr_encap* result)
fill = (128-bits) / 8;
remain_bits = (128-bits) % 8;
mask8 = (0xff >> (8 - remain_bits));
n = 0;
start = 16-fill;
for (n = 0; n < start; n++)