old changes
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@841 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
21
cache.c
21
cache.c
@@ -102,8 +102,13 @@ static krb5_error_code
|
||||
store_int32(int fd,
|
||||
int32_t value)
|
||||
{
|
||||
int ret;
|
||||
|
||||
value = htonl(value);
|
||||
return write(fd, &value, sizeof(value));
|
||||
ret = write(fd, &value, sizeof(value));
|
||||
if (ret != sizeof(value))
|
||||
return (ret<0)?errno:-1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static krb5_error_code
|
||||
@@ -124,8 +129,13 @@ static krb5_error_code
|
||||
store_int16(int fd,
|
||||
int16_t value)
|
||||
{
|
||||
int ret;
|
||||
|
||||
value = htons(value);
|
||||
return write(fd, &value, sizeof(value));
|
||||
ret = write(fd, &value, sizeof(value));
|
||||
if (ret != sizeof(value))
|
||||
return (ret<0)?errno:-1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static krb5_error_code
|
||||
@@ -146,7 +156,12 @@ static krb5_error_code
|
||||
store_int8(int fd,
|
||||
int8_t value)
|
||||
{
|
||||
return write(fd, &value, sizeof(value));
|
||||
int ret;
|
||||
|
||||
ret = write(fd, &value, sizeof(value));
|
||||
if (ret != sizeof(value))
|
||||
return (ret<0)?errno:-1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static krb5_error_code
|
||||
|
Reference in New Issue
Block a user