File autofs-5-1-1-remove-unused-function-elapsed.patch of Package autofs.6209
From: Ian Kent <raven@themaw.net>
Subject: autofs-5.1.1 - remove unused function elapsed()
Git-repo: git://git.kernel.org/pub/scm/linux/storage/autofs/autofs.git
Git-commit: 28d925ecf974d95d55c6b5440b9a28d8039986e2
Patch-mainline: 5.1.2
References: bsc#1046493
Now that the monotonic clock source is used the elapsed() function
is no longer used, remove it.
Signed-off-by: Ian Kent <raven@themaw.net>
Acked-by: Jeff Mahoney <jeffm@suse.com>
---
include/rpc_subs.h | 1 -
lib/rpc_subs.c | 8 --------
2 files changed, 9 deletions(-)
--- a/include/rpc_subs.h
+++ b/include/rpc_subs.h
@@ -70,7 +70,6 @@ int rpc_portmap_getclient(struct conn_in
int rpc_portmap_getport(struct conn_info *, struct pmap *, unsigned short *);
int rpc_ping_proto(struct conn_info *);
int rpc_ping(const char *, long, long, unsigned int);
-double elapsed(struct timeval, struct timeval);
double monotonic_elapsed(struct timespec, struct timespec);
int rpc_time(const char *, unsigned int, unsigned int, long, long, unsigned int, double *);
const char *get_addr_string(struct sockaddr *, char *, socklen_t);
--- a/lib/rpc_subs.c
+++ b/lib/rpc_subs.c
@@ -1066,14 +1066,6 @@ int rpc_ping(const char *host, long seco
return status;
}
-double elapsed(struct timeval start, struct timeval end)
-{
- double t1, t2;
- t1 = (double)start.tv_sec + (double)start.tv_usec/(1000*1000);
- t2 = (double)end.tv_sec + (double)end.tv_usec/(1000*1000);
- return t2-t1;
-}
-
double monotonic_elapsed(struct timespec start, struct timespec end)
{
double t1, t2;