twekkel / htpdate

HTTP Time protocol
https://www.vervest.org/htp
Other
50 stars 13 forks source link

htpdate.c: use fabs() from math.h #36

Closed 00gh closed 2 months ago

00gh commented 2 months ago

This commit will change the usage of the abs() function to the fabs() function, which does accepts double as the argument. The fabs() function is made available via the include statement for math.h.

twekkel commented 2 months ago

gcc doesn't complain about this implicit conversion, while clang does... so the fix makes sense, however also incomplete... it causes a new issue with sleep() => warning: conversion from 'double' to 'unsigned int'

... will fix that in separate commit