In generate_obfuscated_name(), the incoming name is allowed to start
with a '/' character, in which case it is copied over to the new
name and ignored for the remainder of the hash calculation. A '/'
character is needlessly included at the beginning of each name
stashed in the duplicates table (regardless of whether one was
present in the name provided).
Simplify the affected code by processing the '/' right away, and
using a pointer thereafter for the start of the new name. Stop
including a leading '/' in the name used for duplicate detection.
Note: It is not clear a leading '/' character is ever even present
in a name presented for obfuscation. I have not investigated this
question; this change merely adjusts the code while preserving its
original functionality.
Signed-off-by: Alex Elder <aelder@sgi.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>