mirror of
https://github.com/moparisthebest/pacman
synced 2025-02-28 17:31:52 -05:00
Remove final use of the math library from pacman
To round a value, we don't need floorf- we can just cast to an int. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
bcb5465b21
commit
0ea43089e1
@ -132,9 +132,6 @@ AC_CHECK_PROGS([PYTHON], [python2.5 python2.4 python], [false])
|
|||||||
AM_GNU_GETTEXT([external])
|
AM_GNU_GETTEXT([external])
|
||||||
AM_GNU_GETTEXT_VERSION(0.13.1)
|
AM_GNU_GETTEXT_VERSION(0.13.1)
|
||||||
|
|
||||||
# Check for math
|
|
||||||
AC_CHECK_LIB([m], [sqrt], , AC_MSG_ERROR([math library is needed to compile pacman!]))
|
|
||||||
|
|
||||||
# Check for libarchive
|
# Check for libarchive
|
||||||
AC_CHECK_LIB([archive], [archive_read_data], , AC_MSG_ERROR([libarchive is needed to compile pacman!]))
|
AC_CHECK_LIB([archive], [archive_read_data], , AC_MSG_ERROR([libarchive is needed to compile pacman!]))
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
#include <alpm.h>
|
#include <alpm.h>
|
||||||
|
|
||||||
@ -475,7 +474,7 @@ void cb_dl_progress(const char *filename, int xfered, int total)
|
|||||||
rate = total / (timediff * 1024.0);
|
rate = total / (timediff * 1024.0);
|
||||||
|
|
||||||
/* round elapsed time to the nearest second */
|
/* round elapsed time to the nearest second */
|
||||||
eta_s = floorf(timediff + 0.5);
|
eta_s = (int)(timediff + 0.5);
|
||||||
} else {
|
} else {
|
||||||
/* compute current average values */
|
/* compute current average values */
|
||||||
timediff = get_update_timediff(0);
|
timediff = get_update_timediff(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user