Browse Source

pv: return via variable oc value as it is

Daniel-Constantin Mierla 1 year ago
parent
commit
b5cf0da2fb
1 changed files with 1 additions and 5 deletions
  1. 1 5
      src/modules/pv/pv_core.c

+ 1 - 5
src/modules/pv/pv_core.c

@@ -4622,11 +4622,7 @@ int pv_get_via_attr(
 			if(parse_via_oc(msg, vb, &ocv) < 0) {
 				return pv_get_null(msg, param, res);
 			}
-			if(ocv.oc == 1) {
-				return pv_get_sintval(msg, param, res, 1);
-			} else {
-				return pv_get_sintval(msg, param, res, 2);
-			}
+			return pv_get_sintval(msg, param, res, ocv.oc);
 			break;
 		case 10: /* oc-algo */
 			if(parse_via_oc(msg, vb, &ocv) < 0) {