diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-12-22 12:33:16 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-12-22 12:33:16 +0200 |
commit | 9c00937f119f67c44103eaf0edddebaf0c709e22 (patch) | |
tree | 868c4fd9b886ee9be8aa5f179753aa9ba177e634 /lib | |
parent | 854f7486149f2c0713b45dd29a650fb3e10a44e8 (diff) | |
download | librpm-tizen-9c00937f119f67c44103eaf0edddebaf0c709e22.tar.gz librpm-tizen-9c00937f119f67c44103eaf0edddebaf0c709e22.tar.bz2 librpm-tizen-9c00937f119f67c44103eaf0edddebaf0c709e22.zip |
Move htonll() into header.c and make static, not needed elsewhere
Diffstat (limited to 'lib')
-rw-r--r-- | lib/header.c | 9 | ||||
-rw-r--r-- | lib/header_internal.c | 7 | ||||
-rw-r--r-- | lib/header_internal.h | 8 |
3 files changed, 9 insertions, 15 deletions
diff --git a/lib/header.c b/lib/header.c index a88f205e0..893d6f910 100644 --- a/lib/header.c +++ b/lib/header.c @@ -86,6 +86,15 @@ typedef int (*headerTagTagFunction) (Header h, rpmtd td, headerGetFlags hgflags) extern void *rpmHeaderTagFunc(rpmTag tag); +/* Convert a 64bit value to network byte order. */ +static uint64_t htonll( uint64_t n ) { + uint32_t *i = (uint32_t*)&n; + uint32_t b = i[0]; + i[0] = htonl(i[1]); + i[1] = htonl(b); + return n; +} + Header headerLink(Header h) { if (h == NULL) return NULL; diff --git a/lib/header_internal.c b/lib/header_internal.c index 44578d7e7..d3537f9fc 100644 --- a/lib/header_internal.c +++ b/lib/header_internal.c @@ -9,11 +9,4 @@ #include "debug.h" -uint64_t htonll( uint64_t n ) { - uint32_t *i = (uint32_t*)&n; - uint32_t b = i[0]; - i[0] = htonl(i[1]); - i[1] = htonl(b); - return n; -} diff --git a/lib/header_internal.h b/lib/header_internal.h index a228603ce..d9cb67ecb 100644 --- a/lib/header_internal.h +++ b/lib/header_internal.h @@ -92,14 +92,6 @@ extern "C" { #endif /** \ingroup header - * Conver a 64bit value to network byte order. - * @param n a number - * @return number in network byte order - */ -RPM_GNUC_INTERNAL -uint64_t htonll( uint64_t n ); - -/** \ingroup header * Set header instance (rpmdb record number) * @param h header * @param instance record number |