소스 검색

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)
 		{