Permalink
Browse files

Use fabs() instead of abs() for double.

Again thanks to fred.
  • Loading branch information...
1 parent 1d3ea7c commit ca650a5eb20a103dd269822a8ad8c008b57bfc08 @DarthGandalf DarthGandalf committed May 6, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/User.cpp
View
@@ -15,6 +15,7 @@
#include <znc/Server.h>
#include <znc/znc.h>
#include <znc/Modules.h>
+#include <math.h>
class CUserTimer : public CCron {
public:
@@ -223,7 +224,7 @@ bool CUser::ParseConfig(CConfig* pConfig, CString& sError) {
SetTimezone(sValue);
}
if (pConfig->FindStringEntry("timezoneoffset", sValue)) {
- if (abs(sValue.ToDouble()) > 0.1) {
+ if (fabs(sValue.ToDouble()) > 0.1) {
CUtils::PrintError("WARNING: TimezoneOffset has been deprecated, now you can set your timezone by name");
}
}

0 comments on commit ca650a5

Please sign in to comment.