* parse.c (krb5_parse_name): Use assert and abort, not exit
authorKen Raeburn <raeburn@mit.edu>
Fri, 4 Jun 2004 22:42:32 +0000 (22:42 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 4 Jun 2004 22:42:32 +0000 (22:42 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16412 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/parse.c

index 811409b0b9626848d8631860fefb46adaece7f5e..22f6fdab31ececaa837087a24124289e7f13dcf1 100644 (file)
@@ -1,5 +1,7 @@
 2004-06-04  Ken Raeburn  <raeburn@mit.edu>
 
+       * parse.c (krb5_parse_name): Use assert and abort, not exit.
+
        * srv_rcache.c (krb5_get_server_rcache): Don't forget to actually
        include the cache type in the cache name, after looking it up.
 
index 3debb6acf1b89854a40c334afb66ec17af86c1d4..6cf89058be25be735b640a75674892cf20b68e59 100644 (file)
@@ -189,12 +189,11 @@ krb5_parse_name(krb5_context context, const char *name, krb5_principal *nprincip
                                krb5_princ_component(context, principal, i)->length = size;
                if (i + 1 != components) {
 #if !defined(_WIN32) && !defined(macintosh)
-                       fprintf(stderr,
-                               "Programming error in krb5_parse_name!");
-                       exit(1);
-#else
-         /* Need to come up with windows error handling mechanism */
+                   fprintf(stderr,
+                           "Programming error in krb5_parse_name!");
 #endif
+                   assert(i + 1 == components);
+                   abort();
                }
        } else {
                /*