From 54b13240943e1a4f244d412892d0d266def42a5e Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 15 Jul 2009 00:47:09 -0700 Subject: [PATCH] Demystify catopen return value in fstrace For some reason, the code was, on all platforms other than Digital UNIX, assigning the return value of catopen to an integer, with and then immediately assigning it to an nl_catd (the actual return value type). Remove all of that and store the return value directly in an nl_catd variable. Reviewed-on: http://gerrit.openafs.org/93 Reviewed-by: Simon Wilkinson Verified-by: Simon Wilkinson Reviewed-by: Derrick Brashear --- src/venus/fstrace.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/venus/fstrace.c b/src/venus/fstrace.c index 48f5a7c21..e77f917f4 100644 --- a/src/venus/fstrace.c +++ b/src/venus/fstrace.c @@ -561,11 +561,6 @@ dce1_error_inq_text(afs_uint32 status_to_convert, char filename_prefix[7]; char nls_filename[80]; char *message; -#if defined(AFS_64BITPOINTER_ENV) - long J; -#else - int J; -#endif static char *facility_names[] = { "xxx", "afs" @@ -630,17 +625,8 @@ dce1_error_inq_text(afs_uint32 status_to_convert, afs_snprintf(nls_filename, sizeof(nls_filename), "%s/C/%s.cat", AFSDIR_CLIENT_DATA_DIRPATH, filename_prefix); -#if defined(AFS_OSF20_ENV) - catd = (nl_catd) catopen(nls_filename, 0); -#else -#if defined(AFS_64BITPOINTER_ENV) - J = (long)catopen(nls_filename, 0); -#else - J = (int)catopen(nls_filename, 0); -#endif - catd = (nl_catd) J; -#endif - if (catd == (nl_catd) - 1) { + catd = catopen(nls_filename, 0); + if (catd == (nl_catd) -1) { sprintf((char *)error_text, "status %08x (%s / %s)", status_to_convert, facility_name, component_name); return; -- 2.39.5