position in file from long to off_t (as argument for lseek).
* rc_io.c (krb5_rc_io_read, krb5_rc_io_write): Unsigned vs signed
warnings cleanup.
* rc_dfl.c (alive): Do not shadow time() with variable named for same.
* rc_base.c (krb5_rc_resolve_full): Cleanup unsigned vs. signed
warnings.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12663
dc483132-0cff-0310-8789-
dd5450dbe970
+2000-09-21 Ezra Peisach <epeisach@mit.edu>
+
+ * rc_io.h (struct krb5_rc_iostuff): Internal structure - change
+ position in file from long to off_t (as argument for lseek).
+
+ * rc_io.c (krb5_rc_io_read, krb5_rc_io_write): Unsigned vs signed
+ warnings cleanup.
+
+ * rc_dfl.c (alive): Do not shadow time() with variable named for same.
+
+ * rc_base.c (krb5_rc_resolve_full): Cleanup unsigned vs. signed
+ warnings.
+
+
2000-06-29 Ezra Peisach <epeisach@engrailed.mit.edu>
* rc_io.c (krb5_rc_io_creat): Cast getpid() to int.
char *type;
char *residual;
krb5_error_code retval;
+ unsigned int diff;
if (!(residual = strchr(string_name,':')))
return KRB5_RC_PARSE;
- if (!(type = malloc(residual - string_name + 1)))
+ diff = residual - string_name;
+ if (!(type = malloc(diff + 1)))
return KRB5_RC_MALLOC;
- (void) strncpy(type,string_name,residual - string_name);
+ (void) strncpy(type, string_name, diff);
type[residual - string_name] = '\0';
if (!(*id = (krb5_rcache) malloc(sizeof(**id)))) {
krb5_donot_replay *new;
krb5_deltat t;
{
- krb5_int32 time;
+ krb5_int32 mytime;
- if (krb5_timeofday(context, &time))
+ if (krb5_timeofday(context, &mytime))
return CMP_HOHUM; /* who cares? */
- if (new->ctime + t < time) /* I hope we don't have to worry about overflow */
+ if (new->ctime + t < mytime) /* I hope we don't have to worry about overflow */
return CMP_EXPIRED;
return CMP_HOHUM;
}
struct dfl_data *t;
krb5_donot_replay *rep;
{
- int clientlen, serverlen, len;
+ unsigned int clientlen, serverlen, len;
char *buf, *ptr;
krb5_error_code ret;
#define FREE(x) ((void) free((char *) (x)))
#define UNIQUE getpid() /* hopefully unique number */
-static int dirlen = 0;
+static unsigned int dirlen = 0;
static char *dir;
/* The do ... while(0) is required to insure that GETDIR looks like a
krb5_context context;
krb5_rc_iostuff *d;
krb5_pointer buf;
- int num;
+ unsigned int num;
{
if (write(d->fd,(char *) buf,num) == -1)
switch(errno)
krb5_context context;
krb5_rc_iostuff *d;
krb5_pointer buf;
- int num;
+ unsigned int num;
{
int count;
if ((count = read(d->fd,(char *) buf,num)) == -1)
krb5_context context;
krb5_rc_iostuff *d;
{
- d->mark = lseek(d->fd,0,SEEK_CUR); /* can't fail */
+ d->mark = lseek(d->fd,(off_t) 0,SEEK_CUR); /* can't fail */
return 0;
}
#ifdef MSDOS_FILESYSTEM
long mark;
#else
- int mark; /* on newer systems, should be pos_t */
+ off_t mark; /* on newer systems, should be pos_t */
#endif
char *fn;
}
PROTOTYPE((krb5_context,
krb5_rc_iostuff *,
krb5_pointer,
- int));
+ unsigned int));
krb5_error_code krb5_rc_io_read
PROTOTYPE((krb5_context,
krb5_rc_iostuff *,
krb5_pointer,
- int));
+ unsigned int));
krb5_error_code krb5_rc_io_close
PROTOTYPE((krb5_context,
krb5_rc_iostuff *));