diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2011-03-10 13:36:51 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2011-03-11 14:25:45 +0200 |
commit | 0eca826cb8307c3db0878a186b221ae1357a6a3f (patch) | |
tree | c8b7becb5f07dc6ef7bb6d07da30cd3157893786 /lib | |
parent | eb7be49dfa9d03e16431dda8c643a5fa3e300cc2 (diff) | |
download | librpm-tizen-0eca826cb8307c3db0878a186b221ae1357a6a3f.tar.gz librpm-tizen-0eca826cb8307c3db0878a186b221ae1357a6a3f.tar.bz2 librpm-tizen-0eca826cb8307c3db0878a186b221ae1357a6a3f.zip |
Mark htonll() as "const" function
- htonll() is a pure "const" function as it only manipulates the
value passed to it and only calls htonl() functions which are
also const.
- Also fix up the function prototype formatting
Diffstat (limited to 'lib')
-rw-r--r-- | lib/header.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/header.c b/lib/header.c index 144ed9bcb..f2253fe68 100644 --- a/lib/header.c +++ b/lib/header.c @@ -101,7 +101,9 @@ static const size_t headerMaxbytes = (32*1024*1024); #define ENTRY_IN_REGION(_e) ((_e)->info.offset < 0) /* Convert a 64bit value to network byte order. */ -static uint64_t htonll( uint64_t n ) { +RPM_GNUC_CONST +static uint64_t htonll(uint64_t n) +{ uint32_t *i = (uint32_t*)&n; uint32_t b = i[0]; i[0] = htonl(i[1]); |