Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/heimdal/dist/kadmin Don't compare a poin...



details:   https://anonhg.NetBSD.org/src/rev/b6bbc842c74f
branches:  trunk
changeset: 764433:b6bbc842c74f
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Apr 21 17:56:24 2011 +0000

description:
Don't compare a pointer < 0; this is obviously a missed * here.
While here, remove shadow variable warnings.

diffstat:

 crypto/external/bsd/heimdal/dist/kadmin/util.c |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (78 lines):

diff -r 57c4de3818f0 -r b6bbc842c74f crypto/external/bsd/heimdal/dist/kadmin/util.c
--- a/crypto/external/bsd/heimdal/dist/kadmin/util.c    Thu Apr 21 14:27:11 2011 +0000
+++ b/crypto/external/bsd/heimdal/dist/kadmin/util.c    Thu Apr 21 17:56:24 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.c,v 1.1.1.1 2011/04/13 18:14:35 elric Exp $       */
+/*     $NetBSD: util.c,v 1.2 2011/04/21 17:56:24 christos Exp $        */
 
 /*
  * Copyright (c) 1997 - 2006 Kungliga Tekniska Högskolan
@@ -67,7 +67,7 @@
     { "disallow-tgt-based",    KRB5_KDB_DISALLOW_TGT_BASED },
     { "disallow-forwardable",  KRB5_KDB_DISALLOW_FORWARDABLE },
     { "disallow-postdated",    KRB5_KDB_DISALLOW_POSTDATED },
-    { NULL }
+    { NULL, 0 }
 };
 
 /*
@@ -190,7 +190,7 @@
     if (str[0] == '+') {
        str++;
        *t = parse_time(str, "month");
-       if (t < 0)
+       if (*t < 0)
            return -1;
        *t += time(NULL);
        return 0;
@@ -432,7 +432,7 @@
  */
 
 int
-set_entry(krb5_context context,
+set_entry(krb5_context contextp,
          kadm5_principal_ent_t ent,
          int *mask,
          const char *max_ticket_life,
@@ -444,14 +444,14 @@
     if (max_ticket_life != NULL) {
        if (parse_deltat (max_ticket_life, &ent->max_life,
                          mask, KADM5_MAX_LIFE)) {
-           krb5_warnx (context, "unable to parse `%s'", max_ticket_life);
+           krb5_warnx (contextp, "unable to parse `%s'", max_ticket_life);
            return 1;
        }
     }
     if (max_renewable_life != NULL) {
        if (parse_deltat (max_renewable_life, &ent->max_renewable_life,
                          mask, KADM5_MAX_RLIFE)) {
-           krb5_warnx (context, "unable to parse `%s'", max_renewable_life);
+           krb5_warnx (contextp, "unable to parse `%s'", max_renewable_life);
            return 1;
        }
     }
@@ -459,21 +459,21 @@
     if (expiration) {
        if (parse_timet (expiration, &ent->princ_expire_time,
                        mask, KADM5_PRINC_EXPIRE_TIME)) {
-           krb5_warnx (context, "unable to parse `%s'", expiration);
+           krb5_warnx (contextp, "unable to parse `%s'", expiration);
            return 1;
        }
     }
     if (pw_expiration) {
        if (parse_timet (pw_expiration, &ent->pw_expiration,
                         mask, KADM5_PW_EXPIRATION)) {
-           krb5_warnx (context, "unable to parse `%s'", pw_expiration);
+           krb5_warnx (contextp, "unable to parse `%s'", pw_expiration);
            return 1;
        }
     }
     if (attributes != NULL) {
        if (parse_attributes (attributes, &ent->attributes,
                              mask, KADM5_ATTRIBUTES)) {
-           krb5_warnx (context, "unable to parse `%s'", attributes);
+           krb5_warnx (contextp, "unable to parse `%s'", attributes);
            return 1;
        }
     }



Home | Main Index | Thread Index | Old Index