sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit fbf71521f15bd9a3080a756e3ef7820b532ea2a8
parent eee182cdd74a1348b9dfb8bce0016b32543f706a
Author: sin <sin@2f30.org>
Date:   Fri Apr  4 11:05:47 +0100

Rename variable `dif' to `diff' in comm(1)

Diffstat:
comm.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/comm.c b/comm.c @@ -23,7 +23,7 @@ usage(void) int main(int argc, char *argv[]) { - int i, dif = 0; + int i, diff = 0; FILE *fp[2]; char lines[2][LINE_MAX+1]; @@ -46,21 +46,21 @@ main(int argc, char *argv[]) } for(;;) { - if(dif <= 0) { + if(diff <= 0) { if(!nextline(lines[0], sizeof(lines[0]), fp[0], argv[0])) { finish(1, fp[1], argv[1]); } } - if(dif >= 0) { + if(diff >= 0) { if(!nextline(lines[1], sizeof(lines[1]), fp[1], argv[1])) { finish(0, fp[0], argv[0]); } } - dif = strcmp(lines[0], lines[1]); - dif = CLAMP(dif, -1, 1); - printline((2-dif) % 3, lines[MAX(0, dif)]); + diff = strcmp(lines[0], lines[1]); + diff = CLAMP(diff, -1, 1); + printline((2-diff) % 3, lines[MAX(0, diff)]); } return EXIT_SUCCESS;