瀏覽代碼

presence: initialize variable to avoid compile warning

Daniel-Constantin Mierla 10 年之前
父節點
當前提交
c5ef9569d5
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      modules/presence/subscribe.c

+ 2 - 2
modules/presence/subscribe.c

@@ -842,7 +842,7 @@ int handle_subscribe(struct sip_msg* msg, str watcher_user, str watcher_domain)
 	pres_ev_t* event= NULL;
 	pres_ev_t* event= NULL;
 	event_t* parsed_event= NULL;
 	event_t* parsed_event= NULL;
 	param_t* ev_param= NULL;
 	param_t* ev_param= NULL;
-	int found;
+	int found = 0;
 	str reason= {0, 0};
 	str reason= {0, 0};
 	struct sip_uri uri;
 	struct sip_uri uri;
 	int reply_code;
 	int reply_code;
@@ -1040,7 +1040,7 @@ int handle_subscribe(struct sip_msg* msg, str watcher_user, str watcher_domain)
 		goto error;
 		goto error;
 	}
 	}
 	LM_DBG("subscription status= %s - %s\n", get_status_str(subs.status), 
 	LM_DBG("subscription status= %s - %s\n", get_status_str(subs.status), 
-            found==0?"inserted":"found in watcher table");
+            (found==0)?"inserted":"found in watcher table");
 	
 	
 	if (pres_notifier_processes > 0)
 	if (pres_notifier_processes > 0)
 	{
 	{