diff options
| author | Stanislav Sedov <stas@FreeBSD.org> | 2011-10-05 07:23:29 +0000 |
|---|---|---|
| committer | Stanislav Sedov <stas@FreeBSD.org> | 2011-10-05 07:23:29 +0000 |
| commit | 7c450da7b446c557e05f34a100b597800967d987 (patch) | |
| tree | 57a48e7e9b592f2d5b713e80a4455820625c2b7b /lib/krb5/test_get_addrs.c | |
| parent | b4e3a10e9339a8400197298021d6ca9b8e3aa039 (diff) | |
Diffstat (limited to 'lib/krb5/test_get_addrs.c')
| -rw-r--r-- | lib/krb5/test_get_addrs.c | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/lib/krb5/test_get_addrs.c b/lib/krb5/test_get_addrs.c index 1d53e0eb8c68..33ca929e6e85 100644 --- a/lib/krb5/test_get_addrs.c +++ b/lib/krb5/test_get_addrs.c @@ -1,18 +1,18 @@ /* - * Copyright (c) 2000 - 2002 Kungliga Tekniska Högskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. + * Copyright (c) 2000 - 2002 Kungliga Tekniska Högskolan + * (Royal Institute of Technology, Stockholm, Sweden). + * All rights reserved. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * * 3. Neither the name of KTH nor the names of its contributors may be * used to endorse or promote products derived from this software without @@ -34,8 +34,6 @@ #include <err.h> #include <getarg.h> -RCSID("$Id: test_get_addrs.c 15474 2005-06-17 04:48:02Z lha $"); - /* print all addresses that we find */ static void @@ -44,7 +42,7 @@ print_addresses (krb5_context context, const krb5_addresses *addrs) int i; char buf[256]; size_t len; - + for (i = 0; i < addrs->len; ++i) { krb5_print_address (&addrs->val[i], buf, sizeof(buf), &len); printf ("%s\n", buf); @@ -83,7 +81,7 @@ main(int argc, char **argv) if(getarg(args, sizeof(args) / sizeof(args[0]), argc, argv, &optidx)) usage(1); - + if (help_flag) usage (0); @@ -92,9 +90,6 @@ main(int argc, char **argv) exit(0); } - argc -= optidx; - argv += optidx; - ret = krb5_init_context(&context); if (ret) errx (1, "krb5_init_context failed: %d", ret); |
