Group :: Development/Other
RPM: dirdiff
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: dirdiff-1.6-alt-fixes.patch
Download
Download
--- dirdiff-1.6/filecmp.c.orig 2002-04-20 10:35:03 +0400
+++ dirdiff-1.6/filecmp.c 2003-09-08 00:37:18 +0400
@@ -9,6 +9,7 @@
#include <stdio.h>
#include <string.h>
#include <ctype.h>
+#include <unistd.h>
#include <tcl.h>
#include <sys/fcntl.h>
@@ -48,9 +49,9 @@ tag_length(p, n)
char *p;
int n;
{
- int i, j, k, l;
+ int i, j, l;
int maybe;
- char *t, *cl;
+ char *t;
/* check through list of tags */
for (i = 0; (t = rcs_ignores[i]) != NULL; ++i) {
@@ -125,7 +126,7 @@ int rcscmp(char *p1, int *k1p, char *p2,
p2 += i;
k2 -= i;
/* 4 == strlen("<dollar>Id<dollar>") */
- if (k1 < 4 && !e1 || k2 < 4 && !e2)
+ if ((k1 < 4 && !e1) || (k2 < 4 && !e2))
break;
if (k1 < 4 || k2 < 4) {
/* near the end of one or both files */
@@ -195,7 +196,7 @@ int bkcmp(char *p1, int *k1p, char *p2,
k2 -= i;
if (match < BKTAGLEN) {
/* we have run out of one or other buffer */
- if (k1 == 0 && e1 || k2 == 0 && e2) {
+ if ((k1 == 0 && e1) || (k2 == 0 && e2)) {
if (k1 == k2)
break;
return 0;
@@ -219,7 +220,7 @@ int bkcmp(char *p1, int *k1p, char *p2,
continue;
}
/* ran out before eol on one or both files */
- if (t1 == k1 && e1 || t2 == k2 && e2) {
+ if ((t1 == k1 && e1) || (t2 == k2 && e2)) {
k1 -= t1;
k2 -= t2;
if (k1 == k2)
@@ -243,10 +244,10 @@ FileCmpCmd(clientData, interp, argc, arg
int argc;
char **argv;
{
- int i, fi;
+ int fi;
int f1, f2;
char *b1, *b2;
- int n1, n2, same;
+ int n1 = 0, n2 = 0, same;
int k1, k2, t1, t2;
int rcsflag, bkflag;
int e1, e2;