From 02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Sat, 31 Oct 2009 00:48:38 +0000 Subject: make mark-cstyle make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/support/errors.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/util/support/errors.c') diff --git a/src/util/support/errors.c b/src/util/support/errors.c index 8d523b98b3..e89d8ad456 100644 --- a/src/util/support/errors.c +++ b/src/util/support/errors.c @@ -69,7 +69,7 @@ krb5int_vset_error_fl (struct errinfo *ep, long code, va_list args2; char *str = NULL, *str2, *slash; const char *loc_fmt = NULL; - + #ifdef USE_KIM /* Try to localize the format string */ if (kim_os_string_create_localized(&loc_fmt, fmt) != KIM_NO_ERROR) { @@ -78,7 +78,7 @@ krb5int_vset_error_fl (struct errinfo *ep, long code, #else loc_fmt = fmt; #endif - + /* try vasprintf first */ va_copy(args2, args); if (vasprintf(&str, loc_fmt, args2) < 0) { @@ -96,21 +96,21 @@ krb5int_vset_error_fl (struct errinfo *ep, long code, str = str2; } } - + /* If that failed, try using scratch_buf */ if (str == NULL) { vsnprintf(ep->scratch_buf, sizeof(ep->scratch_buf), loc_fmt, args); str = strdup(ep->scratch_buf); /* try allocating again */ } - + /* free old string before setting new one */ if (ep->msg && ep->msg != ep->scratch_buf) { free ((char *) ep->msg); ep->msg = NULL; - } + } ep->code = code; ep->msg = str ? str : ep->scratch_buf; - + #ifdef USE_KIM if (loc_fmt != fmt) { kim_string_free(&loc_fmt); } #else @@ -197,7 +197,7 @@ krb5int_get_error (struct errinfo *ep, long code) unlock(); goto format_number; } - + r2 = strdup(r); if (r2 == NULL) { strncpy(ep->scratch_buf, r, sizeof(ep->scratch_buf)); -- cgit