瀏覽代碼

pv: use int index for looking up flag index

- some functions used for check may return negative on error

(cherry picked from commit 30359b3cfce2ce909153e06b1954778c4eababa7)
Daniel-Constantin Mierla 11 年之前
父節點
當前提交
3bfbc96ae6
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      modules/pv/pv_core.c

+ 2 - 2
modules/pv/pv_core.c

@@ -2711,12 +2711,12 @@ error:
 
 int pv_parse_flag_param(pv_spec_p sp, str *in)
 {
-	unsigned int n;
+	int n;
 
 	if(sp==NULL || in==NULL || in->len<=0)
 		return -1;
 
-	if (str2int(in, &n) != 0)
+	if (str2sint(in, &n) != 0)
 	{
 		if ((n = get_flag_no(in->s, in->len)) < 0)
 		{