- Add const-qualifiers to the arguments of isonum_*().
- According to ISO 9660 7.1.2, isonum_712() should return a signed value. - Try to get isonum_*() closer to style(9).
This commit is contained in:
parent
2c38cc792e
commit
cd67748bde
@ -291,56 +291,65 @@ u_short sgetrune(const char *, size_t, char const **, int, void *);
|
||||
*/
|
||||
|
||||
static __inline uint8_t
|
||||
isonum_711(unsigned char *p)
|
||||
isonum_711(const unsigned char *p)
|
||||
{
|
||||
return p[0];
|
||||
|
||||
return (p[0]);
|
||||
}
|
||||
|
||||
static __inline int8_t
|
||||
isonum_712(const unsigned char *p)
|
||||
{
|
||||
|
||||
return ((signed char)p[0]);
|
||||
}
|
||||
|
||||
static __inline uint8_t
|
||||
isonum_712(unsigned char *p)
|
||||
isonum_713(const unsigned char *p)
|
||||
{
|
||||
return p[0];
|
||||
}
|
||||
|
||||
static __inline uint8_t
|
||||
isonum_713(unsigned char *p)
|
||||
{
|
||||
return p[0];
|
||||
return (p[0]);
|
||||
}
|
||||
|
||||
static __inline uint16_t
|
||||
isonum_721(unsigned char *p)
|
||||
isonum_721(const unsigned char *p)
|
||||
{
|
||||
|
||||
return (p[0] | p[1] << 8);
|
||||
}
|
||||
|
||||
static __inline uint16_t
|
||||
isonum_722(unsigned char *p)
|
||||
isonum_722(const unsigned char *p)
|
||||
{
|
||||
|
||||
return (p[1] | p[0] << 8);
|
||||
}
|
||||
|
||||
static __inline uint16_t
|
||||
isonum_723(unsigned char *p)
|
||||
isonum_723(const unsigned char *p)
|
||||
{
|
||||
|
||||
return (p[0] | p[1] << 8);
|
||||
}
|
||||
|
||||
static __inline uint32_t
|
||||
isonum_731(unsigned char *p)
|
||||
isonum_731(const unsigned char *p)
|
||||
{
|
||||
|
||||
return (p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24);
|
||||
}
|
||||
|
||||
static __inline uint32_t
|
||||
isonum_732(unsigned char *p)
|
||||
isonum_732(const unsigned char *p)
|
||||
{
|
||||
|
||||
return (p[3] | p[2] << 8 | p[1] << 16 | p[0] << 24);
|
||||
}
|
||||
|
||||
static __inline uint32_t
|
||||
isonum_733(unsigned char *p)
|
||||
isonum_733(const unsigned char *p)
|
||||
{
|
||||
|
||||
return (p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user