From ccd598323e0ed5c7d2d3f81dc56171b0b22e688a Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Fri, 9 Jun 1995 22:50:37 +0000 Subject: [PATCH] rd_req_dec.c (krb5_rd_req_decoded): Fix -Wall nits configure.in: Remove standardized set of autoconf macros, which are now handled by CONFIG_RULES. Makefile.in, faddr_ordr.c: Remove faddr_ordr.c; its function, krb5_fulladdr_order, isn't used anywhere. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6011 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/ChangeLog | 10 +++++ src/lib/krb5/krb/Makefile.in | 2 - src/lib/krb5/krb/configure.in | 4 -- src/lib/krb5/krb/faddr_ordr.c | 69 ----------------------------------- src/lib/krb5/krb/rd_req_dec.c | 6 +-- 5 files changed, 13 insertions(+), 78 deletions(-) delete mode 100644 src/lib/krb5/krb/faddr_ordr.c diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index fcceae15c..6dc506193 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,13 @@ +Fri Jun 9 18:48:43 1995 + + * rd_req_dec.c (krb5_rd_req_decoded): Fix -Wall nits + + * configure.in: Remove standardized set of autoconf macros, which + are now handled by CONFIG_RULES. + + * Makefile.in, faddr_ordr.c: Remove faddr_ordr.c; its function, + krb5_fulladdr_order, isn't used anywhere. + Fri Jun 9 02:42:54 1995 Tom Yu (tlyu@dragons-lair) * rd_cred.c (krb5_rd_cred_basic): fix typo (extra "context" diff --git a/src/lib/krb5/krb/Makefile.in b/src/lib/krb5/krb/Makefile.in index 154e5aca2..0a040e71a 100644 --- a/src/lib/krb5/krb/Makefile.in +++ b/src/lib/krb5/krb/Makefile.in @@ -32,7 +32,6 @@ OBJS= addr_comp.$(OBJEXT) \ encode_kdc.$(OBJEXT) \ encrypt_tk.$(OBJEXT) \ free_rtree.$(OBJEXT) \ - faddr_ordr.$(OBJEXT) \ gc_frm_kdc.$(OBJEXT) \ gc_via_tkt.$(OBJEXT) \ gen_seqnum.$(OBJEXT) \ @@ -95,7 +94,6 @@ SRCS= $(srcdir)/addr_comp.c \ $(srcdir)/encode_kdc.c \ $(srcdir)/encrypt_tk.c \ $(srcdir)/free_rtree.c \ - $(srcdir)/faddr_ordr.c \ $(srcdir)/gc_frm_kdc.c \ $(srcdir)/gc_via_tkt.c \ $(srcdir)/gen_seqnum.c \ diff --git a/src/lib/krb5/krb/configure.in b/src/lib/krb5/krb/configure.in index 6ee82e646..9bfbc7603 100644 --- a/src/lib/krb5/krb/configure.in +++ b/src/lib/krb5/krb/configure.in @@ -1,12 +1,8 @@ AC_INIT(configure.in) -WITH_CCOPTS CONFIG_RULES -AC_SET_BUILDTOP -WITH_NETLIB AC_PROG_ARCHIVE AC_PROG_ARCHIVE_ADD AC_PROG_RANLIB V5_SHARED_LIB_OBJS SubdirLibraryRule([$(OBJS)]) -KRB_INCLUDE V5_AC_OUTPUT_MAKEFILE diff --git a/src/lib/krb5/krb/faddr_ordr.c b/src/lib/krb5/krb/faddr_ordr.c deleted file mode 100644 index 629499366..000000000 --- a/src/lib/krb5/krb/faddr_ordr.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * lib/krb5/krb/faddr_ordr.c - * - * Copyright 1990 by the Massachusetts Institute of Technology. - * All Rights Reserved. - * - * Export of this software from the United States of America may - * require a specific license from the United States Government. - * It is the responsibility of any person or organization contemplating - * export to obtain such a license before exporting. - * - * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and - * distribute this software and its documentation for any purpose and - * without fee is hereby granted, provided that the above copyright - * notice appear in all copies and that both that copyright notice and - * this permission notice appear in supporting documentation, and that - * the name of M.I.T. not be used in advertising or publicity pertaining - * to distribution of the software without specific, written prior - * permission. M.I.T. makes no representations about the suitability of - * this software for any purpose. It is provided "as is" without express - * or implied warranty. - * - * - * krb5_fulladdr_order() - */ - -#include "k5-int.h" - -#ifndef min -#define min(a,b) ((a) > (b) ? (a) : (b)) -#endif - -/* - * Return an ordering on the two full addresses: 0 if the same, - * < 0 if first is less than 2nd, > 0 if first is greater than 2nd. - */ -int -krb5_fulladdr_order(context, addr1, addr2) - krb5_context context; - register const krb5_fulladdr *addr1; - register const krb5_fulladdr *addr2; -{ - int dir; - const int minlen = min(addr1->address->length, addr2->address->length); - register int i; - - dir = addr1->address->addrtype - addr2->address->addrtype; - if (dir) - return(dir); - - dir = addr1->address->length - addr2->address->length; - if (dir) - return(dir); - - for (i = 0; i < minlen; i++) { - if ((unsigned char) addr1->address->contents[i] < - (unsigned char) addr2->address->contents[i]) - return -1; - else if ((unsigned char) addr1->address->contents[i] > - (unsigned char) addr2->address->contents[i]) - return 1; - } - if (addr1->port > addr2->port) - return(1); - else if (addr1->port < addr2->port) - return(-1); - else - return(0); -} diff --git a/src/lib/krb5/krb/rd_req_dec.c b/src/lib/krb5/krb/rd_req_dec.c index f90d439eb..c450a69c1 100644 --- a/src/lib/krb5/krb/rd_req_dec.c +++ b/src/lib/krb5/krb/rd_req_dec.c @@ -234,7 +234,7 @@ krb5_rd_req_decoded(context, auth_context, req, server, keytab, else starttime = req->ticket->enc_part2->times.authtime; - if (retval = krb5_timeofday(context, ¤ttime)) + if ((retval = krb5_timeofday(context, ¤ttime))) goto cleanup; if (starttime - currenttime > krb5_clockskew) { retval = KRB5KRB_AP_ERR_TKT_NYV; /* ticket not yet valid */ @@ -255,8 +255,8 @@ krb5_rd_req_decoded(context, auth_context, req, server, keytab, (*auth_context)->remote_seq_number = (*auth_context)->authentp->seq_number; (*auth_context)->remote_subkey = (*auth_context)->authentp->subkey; - if (retval = krb5_copy_keyblock(context, req->ticket->enc_part2->session, - &((*auth_context)->keyblock))) + if ((retval = krb5_copy_keyblock(context, req->ticket->enc_part2->session, + &((*auth_context)->keyblock)))) goto cleanup; /* -- 2.26.2