瀏覽代碼

pv: use int index for looking up flag index

- some functions used for check may return negative on error
Daniel-Constantin Mierla 11 年之前
父節點
當前提交
30359b3cfc
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      modules/pv/pv_core.c

+ 2 - 2
modules/pv/pv_core.c

@@ -2849,12 +2849,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)
 		{