Blame SOURCES/cscope-1-modified-from-patch-81-Fix-reading-include-files-in-.patch

0d6b98
From 39fb385d69dc06343e8f8a7e28d516d5aef97ec8 Mon Sep 17 00:00:00 2001
0d6b98
From: Hans-Bernhard Broeker <HBBroeker@T-Online.de>
0d6b98
Date: Sat, 28 Jul 2018 17:50:03 +0200
0d6b98
Subject: [PATCH 1/9] [modified from patch #81] Fix reading include files in -c
0d6b98
 mode
0d6b98
0d6b98
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
0d6b98
---
0d6b98
 src/build.c | 6 +++---
0d6b98
 1 file changed, 3 insertions(+), 3 deletions(-)
0d6b98
0d6b98
diff --git a/src/build.c b/src/build.c
0d6b98
index a32b5cb..557e660 100644
0d6b98
--- a/src/build.c
0d6b98
+++ b/src/build.c
0d6b98
@@ -124,7 +124,7 @@ samelist(FILE *oldrefs, char **names, int count)
0d6b98
     }
0d6b98
     /* see if the name list is the same */
0d6b98
     for (i = 0; i < count; ++i) {
0d6b98
-	if ((1 != fscanf(oldrefs," %[^\n]",oldname)) ||
0d6b98
+	if ((1 != fscanf(oldrefs," %" PATHLEN_STR "[^\n]",oldname)) ||
0d6b98
 	    strnotequal(oldname, names[i])) {
0d6b98
 	    return(NO);
0d6b98
 	}
0d6b98
@@ -305,7 +305,7 @@ cscope: -q option mismatch between command line and old symbol database\n");
0d6b98
 	/* see if the list of source files is the same and
0d6b98
 	   none have been changed up to the included files */
0d6b98
 	for (i = 0; i < nsrcfiles; ++i) {
0d6b98
-	    if ((1 != fscanf(oldrefs," %[^\n]",oldname))
0d6b98
+	    if ((1 != fscanf(oldrefs, " %" PATHLEN_STR "[^\n]", oldname))
0d6b98
 		|| strnotequal(oldname, srcfiles[i])
0d6b98
 		|| (lstat(srcfiles[i], &statstruct) != 0)
0d6b98
 		|| (statstruct.st_mtime > reftime)
0d6b98
@@ -315,7 +315,7 @@ cscope: -q option mismatch between command line and old symbol database\n");
0d6b98
 	}
0d6b98
 	/* the old cross-reference is up-to-date */
0d6b98
 	/* so get the list of included files */
0d6b98
-	while (i++ < oldnum && fgets(oldname, sizeof(oldname), oldrefs)) {
0d6b98
+	while (i++ < oldnum && fscanf(oldrefs, "%" PATHLEN_STR "s", oldname)) {
0d6b98
 	    addsrcfile(oldname);
0d6b98
 	}
0d6b98
 	fclose(oldrefs);
0d6b98
-- 
0d6b98
2.26.2
0d6b98