From: Stefan Beller Date: Fri, 30 Jun 2017 00:06:46 +0000 (-0700) Subject: diff.c: readability fix X-Git-Tag: v2.15.0-rc0~130^2~24 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/f2d2a5def088b474586eedfa4fa547bc2c955bb9 diff.c: readability fix We already have dereferenced 'p->two' into a local variable 'two'. Use that. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- diff --git a/diff.c b/diff.c index 00b4c86698..2874dfc6fc 100644 --- a/diff.c +++ b/diff.c @@ -3282,8 +3282,8 @@ static void run_diff(struct diff_filepair *p, struct diff_options *o) const char *other; const char *attr_path; - name = p->one->path; - other = (strcmp(name, p->two->path) ? p->two->path : NULL); + name = one->path; + other = (strcmp(name, two->path) ? two->path : NULL); attr_path = name; if (o->prefix_length) strip_prefix(o->prefix_length, &name, &other);