diff.c: readability fix

We already have dereferenced 'p->two' into a local variable 'two'.
Use that.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Stefan Beller 2017-06-29 17:06:46 -07:00 committed by Junio C Hamano
parent 2cfb6cec94
commit f2d2a5def0

4
diff.c
View File

@ -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);