From 8e2f7e87f4d854e697c40545326a16e50614dd5c Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Thu, 22 Sep 2016 03:58:13 +0200 Subject: add osmo_gettimeofday as a shim around gettimeofday This allows feeding a custom time for unit tests by overriding osmo_gettimeofday. Change-Id: Ic7a81a6eb51f27fe452962b91f2eae2070d87089 --- src/vty/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vty') diff --git a/src/vty/command.c b/src/vty/command.c index 483ca801..9d8bf314 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -637,7 +637,7 @@ static char *zencrypt(const char *passwd) struct timeval tv; char *crypt(const char *, const char *); - gettimeofday(&tv, 0); + osmo_gettimeofday(&tv, 0); to64(&salt[0], random(), 3); to64(&salt[3], tv.tv_usec, 3); -- cgit v1.2.3