summaryrefslogtreecommitdiff
path: root/libpiano
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2009-03-01 15:03:08 +0100
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2009-03-01 15:03:08 +0100
commitd6764679ed3735714acae44c5cf529a9d047dc8b (patch)
tree236d718069aa7f41713c87f4dae7cab268ba8a42 /libpiano
parent152c67bb38e71c1b189774beac07008cbc4d1631 (diff)
downloadpianobar-d6764679ed3735714acae44c5cf529a9d047dc8b.tar.gz
pianobar-d6764679ed3735714acae44c5cf529a9d047dc8b.tar.bz2
pianobar-d6764679ed3735714acae44c5cf529a9d047dc8b.zip
Even more documentation
...and small cleanups.
Diffstat (limited to 'libpiano')
-rw-r--r--libpiano/src/crypt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpiano/src/crypt.c b/libpiano/src/crypt.c
index 2e6dd55..1b59533 100644
--- a/libpiano/src/crypt.c
+++ b/libpiano/src/crypt.c
@@ -105,7 +105,7 @@ char *PianoIntsToString (const unsigned int *arrInts, size_t arrIntsN) {
for (i = 0; i < arrIntsN; i++) {
/* map string to 4-byte int */
tmp = (unsigned int *) &strDecoded[i*4];
- /* FIXME: big endian does not need to byteswap? */
+ /* FIXME: big endian does not need byteswap? */
*tmp = byteswap32 (arrInts[i]);
}
return strDecoded;
@@ -219,8 +219,8 @@ char *PianoIntsToHexString (const unsigned int *arrInts, size_t arrIntsN) {
size_t intMapN = arrIntsN * sizeof (*arrInts);
for (i = 0; i < intMapN; i++) {
- /* we need to swap the bytes again */
writePos = i + (4 - (i % 4) * 2) - 1;
+ /* we need to swap the bytes again */
hexStr[writePos*2] = (intMap[i] & 0xf0) < 0xa0 ? (intMap[i] >> 4) +
'0' : (intMap[i] >> 4) + 'a' - 10;
hexStr[writePos*2+1] = (intMap[i] & 0x0f) < 0x0a ? (intMap[i] & 0x0f) +