Fix "use of unitialized variable" in xxtea.c and byteorder.c

This commit is contained in:
Stefan `Sec` Zehl 2011-07-18 18:24:34 +02:00
parent 628b88ce73
commit f90c995053
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ void uint32touint8p(uint32_t v, uint8_t *p)
uint32_t uint8ptouint32(uint8_t *p)
{
uint32_t v;
uint32_t v=0;
v |= *p++; v<<=8;
v |= *p++; v<<=8;
v |= *p++; v<<=8;

View File

@ -13,7 +13,7 @@
uint32_t htonl(uint32_t v)
{
uint32_t r;
uint32_t r=0;
r |= (v>> 0)&0xFF; r<<=8;
r |= (v>> 8)&0xFF; r<<=8;
r |= (v>>16)&0xFF; r<<=8;