From: Simon Wilkinson Date: Sun, 24 Feb 2013 12:53:59 +0000 (+0000) Subject: budb: Store dumper information correctly X-Git-Tag: upstream/1.6.3^2~89 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=7f5856342961540f46b9012cda12b144d5256274;p=packages%2Fo%2Fopenafs.git budb: Store dumper information correctly Change f498c18a6f7300eb89ca3b9d9b85c4d461fa8474 attempted to fix a problem with using an inappropriate function to copy the ktc_principal value 'principal' into the d.dumper structure element. Originally the code read: principal_hton(&principal, &d.dumper) which copies the 'host' principal principal into the 'net' structure d.dumper. However, this was changed to principal = d.dumper Which populates 'principal' with whatever garbage is in the d.dumper structure. Fix this so that the assignment is done the right way around. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9252 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit dce2d8206ecd35c96e75cc0662432c2a4f9c3d7a) Change-Id: Ib3851649293bddedf465739acc9bd7ad327c80e0 Reviewed-on: http://gerrit.openafs.org/9537 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand --- diff --git a/src/budb/procs.c b/src/budb/procs.c index 8cf051e42..51f310263 100644 --- a/src/budb/procs.c +++ b/src/budb/procs.c @@ -1487,7 +1487,7 @@ CreateDump(struct rx_call *call, struct budb_dumpEntry *dump) dump->created = dump->id; d.created = htonl(dump->created); - principal = d.dumper; + d.dumper = principal; tapeSet_hton(&dump->tapes, &d.tapes); d.flags = htonl(dump->flags | BUDB_DUMP_INPROGRESS);