From 856c92de0cfccee39750fda1d04d410fdb06bbe2 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 12 Aug 2014 15:39:39 +0200 Subject: macros for ato* with cast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libmdsserver/util.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/libmdsserver/util.c') diff --git a/src/libmdsserver/util.c b/src/libmdsserver/util.c index 469b616..7047d9b 100644 --- a/src/libmdsserver/util.c +++ b/src/libmdsserver/util.c @@ -57,9 +57,8 @@ uint64_t parse_client_id(const char* str) strcpy(client_high = client_words, str); client_low = rawmemchr(client_words, ':'); *client_low++ = '\0'; - client = (uint64_t)atoll(client_high); - client <<= 32; - client |= (uint64_t)atoll(client_low); + client = atou64(client_high) << 32; + client |= atou64(client_low); return client; } -- cgit v1.2.3-70-g09d2