فهرست منبع

Fixing compiler warnings

Olle E. Johansson 12 سال پیش
والد
کامیت
35683cfb90
3فایلهای تغییر یافته به همراه3 افزوده شده و 4 حذف شده
  1. 1 2
      modules_k/pike/pike_rpc.c
  2. 1 1
      modules_k/pike/pike_top.c
  3. 1 1
      modules_k/pike/pike_top.h

+ 1 - 2
modules_k/pike/pike_rpc.c

@@ -138,7 +138,7 @@ static void pike_top(rpc_t *rpc, void *c)
 
 	if (options == 0) {
 		rpc->fault(c, 500, "Bad argument. Select: ALL, HOT or WARM");
-		exit;
+		return;
 	}
 	
 	
@@ -196,4 +196,3 @@ rpc_export_t pike_rpc_methods[] = {
 	{"pike.top",   pike_top,     pike_top_doc, 0},
 	{0, 0, 0, 0}
 };
-

+ 1 - 1
modules_k/pike/pike_top.c

@@ -45,7 +45,7 @@ static char *print_addr(unsigned char *ip, int iplen)
 	return pike_top_print_addr(ip, iplen, buff, sizeof(buff));
 }
 
-int pike_top_add_entry( unsigned char *ip_addr, int addr_len, unsigned int leaf_hits[2], unsigned int hits[2], unsigned int expires, node_status_t status )
+int pike_top_add_entry( unsigned char *ip_addr, int addr_len, unsigned short leaf_hits[2], unsigned short hits[2], unsigned int expires, node_status_t status )
 {
 	struct TopListItem_t *new_item = (struct TopListItem_t *)malloc(sizeof(struct TopListItem_t));
 	

+ 1 - 1
modules_k/pike/pike_top.h

@@ -16,7 +16,7 @@ struct TopListItem_t {
 };
 
 // returns 1 when OK and 0 when failed
-int pike_top_add_entry( unsigned char *ip_addr, int iplen, unsigned int leaf_hits[2], unsigned int hits[2], unsigned int expires, node_status_t status );
+int pike_top_add_entry( unsigned char *ip_addr, int addr_len, unsigned short leaf_hits[2], unsigned short hits[2], unsigned int expires, node_status_t status );
 
 struct TopListItem_t *pike_top_get_root();
 void pike_top_list_clear();