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

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