vol: fix namei_ConvertROtoRWvolume return code 65/14065/3
authorMarcio Barbosa <mbarbosa@sinenomine.net>
Fri, 6 Mar 2020 15:15:38 +0000 (15:15 +0000)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 20 Mar 2020 04:14:37 +0000 (00:14 -0400)
commit957b06984b77cba74bd90217b723220c1844809b
tree92a5dddd1a154ae1ca81bd2c81a67d6b084a26ec
parent38d78e2496c3d242e44bad401ecffe15e3883388
vol: fix namei_ConvertROtoRWvolume return code

Commit 8632f23d6718a3cd621791e82d1cf6ead8690978 introduced checks for
the return value of snprintf calls in namei_ops. On success, the value
returned by this function represents the number of written characters.
Unfortunately, the variable used to store this value is the same
variable that represents the status code returned by
namei_ConvertROtoRWvolume. Consequently, a successful execution of
namei_ConvertROtoRWvolume results in a status code different the 0 (and
equal to the number of written characters).

To fix this problem, set the status code in question back to 0 after a
successful execution of namei_ConvertROtoRWvolume.

Change-Id: Ic6fd6483f8d94fd64587f8bae249b9d911d846b4
Reviewed-on: https://gerrit.openafs.org/14065
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/vol/namei_ops.c