From: Michael Meffie Date: Thu, 14 Jul 2011 16:02:21 +0000 (-0400) Subject: audit: remove uneeded strncpy X-Git-Tag: upstream/1.8.0_pre1^2~3521 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=45025e949bba0244d51e406b9105fb14bcba902d;p=packages%2Fo%2Fopenafs.git audit: remove uneeded strncpy In this caller to krb_realms, when no realms names are returned the number of local realms is correctly set to zero, however the first local realm buffer is filled with a placeholder string which is not used. Remove the uneeded strncpy, which also makes this section of code consistent with afs_is_foreign_ticket(). This section of code is duplicated by afs_is_foreign_ticket() and should be consolidated in a subsequent patch. Change-Id: I48f84934e7321769eebaf80c83b2c100fd026a6a Reviewed-on: http://gerrit.openafs.org/5020 Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/audit/audit.c b/src/audit/audit.c index 3bb5f76fe..de73c6f37 100644 --- a/src/audit/audit.c +++ b/src/audit/audit.c @@ -456,8 +456,6 @@ osi_auditU(struct rx_call *call, char *audEvent, int errCode, ...) break; } - if (i == 0) - strncpy(local_realms[0], "UNKNOWN.LOCAL.REALM", AFS_REALM_SZ); num_lrealms = i; }