diff mbox series

dvb-sat: remove pointless abs call

Message ID 20200416040930.388895-1-rosenp@gmail.com
State New
Headers show
Series dvb-sat: remove pointless abs call | expand

Commit Message

Rosen Penev April 16, 2020, 4:09 a.m. UTC
unsigned values cannot be negative.

Found with clang-diagnostic-absolute-value

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

Patch

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.);