[PATCH] dvb-sat: remove pointless abs call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



unsigned values cannot be negative.

Found with clang-diagnostic-absolute-value

Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
---
 lib/libdvbv5/dvb-sat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libdvbv5/dvb-sat.c b/lib/libdvbv5/dvb-sat.c
index 18e2359c..9c060161 100644
--- a/lib/libdvbv5/dvb-sat.c
+++ b/lib/libdvbv5/dvb-sat.c
@@ -715,7 +715,7 @@ int dvb_sat_set_parms(struct dvb_v5_fe_parms *p)
 
 	rc = dvbsat_diseqc_set_input(parms, t);
 
-	freq = abs(freq - parms->freq_offset);
+	freq = freq - parms->freq_offset;
 
 	if (parms->p.verbose)
 		dvb_log("L-Band frequency: %.2f MHz (offset = %.2f MHz)", freq / 1000., parms->freq_offset/1000.);
-- 
2.25.2




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux