diff options
author | srijan-sivakumar <ssivakum@redhat.com> | 2020-09-26 19:17:41 +0530 |
---|---|---|
committer | MOHIT AGRAWAL <moagrawa@redhat.com> | 2020-09-28 06:09:36 +0000 |
commit | 2d2ea54a2cd895aef40e39109ea98c94aa02a473 (patch) | |
tree | bf8cee1b7c0605ba86fe7a0498ea7c863bffafc1 /tests/basic/seek.c | |
parent | d34daa73fe6eacaca3b4b3ed666ed44ef5d727b4 (diff) |
glusterd: Replacing str with ptr in strchr to reduce comparison
Issue: On seeing the function glusterd_replace_slash_with_hyphen
we see that the strchr inside the while loop takes str as a
parameter, that'd mean repeated comparison from index 0 of str
even though the characters have already been compared. Why not
use ptr instead which points to the latest replacement in the
string.
Code change: replacing str with ptr inside the strchr function.
Fixes: #1516
Change-Id: Id049ec2ad9800a01730f2a0263d9e0528557ae81
Signed-off-by: srijan-sivakumar <ssivakum@redhat.com>
Diffstat (limited to 'tests/basic/seek.c')
0 files changed, 0 insertions, 0 deletions