Browse code

- fixed comp_avp returning values != 0 , 1 or -1 (error)

Andrei Pelinescu-Onciul authored on 27/01/2006 18:33:11
Showing 1 changed files
... ...
@@ -550,18 +550,18 @@ inline static int comp_avp(int op, avp_spec_t* spec, int rtype, union exp_op* r,
550 550
 	switch(op) {
551 551
 	case NO_OP:
552 552
 		if (avp->flags & AVP_VAL_STR) {
553
-			return val.s.len;
553
+			return val.s.len!=0;
554 554
 		} else {
555 555
 			return val.n != 0;
556 556
 		}
557 557
 		break;
558 558
 
559 559
 	case BINOR_OP:
560
-		return val.n | r->intval;
560
+		return (val.n | r->intval)!=0;
561 561
 		break;
562 562
 
563 563
 	case BINAND_OP:
564
-		return val.n & r->intval;
564
+		return (val.n & r->intval)!=0;
565 565
 		break;
566 566
 	}
567 567