[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * info/nodes.c (SUBFILE): turn first_byte field t
From: |
Patrice Dumas |
Subject: |
branch master updated: * info/nodes.c (SUBFILE): turn first_byte field to size_t as it is certain that it is positive now. |
Date: |
Tue, 08 Oct 2024 02:59:41 -0400 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 0440d3646b * info/nodes.c (SUBFILE): turn first_byte field to size_t
as it is certain that it is positive now.
0440d3646b is described below
commit 0440d3646b85dd44d1c638d6415d50484adb8bf1
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Oct 8 08:59:27 2024 +0200
* info/nodes.c (SUBFILE): turn first_byte field to size_t as it is
certain that it is positive now.
* info/nodes.c (get_tags_of_indirect_tags_table): rename
first_byte variable as line_first_byte.
---
ChangeLog | 8 ++++++++
info/nodes.c | 10 +++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9ab9e3b4b4..37ce5b7d2b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-10-08 Patrice Dumas <pertusus@free.fr>
+
+ * info/nodes.c (SUBFILE): turn first_byte field to size_t as it is
+ certain that it is positive now.
+
+ * info/nodes.c (get_tags_of_indirect_tags_table): rename
+ first_byte variable as line_first_byte.
+
2024-10-08 Patrice Dumas <pertusus@free.fr>
* info/nodes.c (get_tags_of_indirect_tags_table): ignore a bogus entry
diff --git a/info/nodes.c b/info/nodes.c
index 468be45274..2ca983b280 100644
--- a/info/nodes.c
+++ b/info/nodes.c
@@ -356,7 +356,7 @@ get_tags_of_indirect_tags_table (FILE_BUFFER *file_buffer,
an intermediate value. */
typedef struct {
char *filename;
- long first_byte;
+ size_t first_byte;
} SUBFILE;
SUBFILE **subfiles = NULL;
@@ -385,24 +385,24 @@ get_tags_of_indirect_tags_table (FILE_BUFFER *file_buffer,
while (line < end)
{
int colon;
- long first_byte;
+ long line_first_byte;
colon = string_in_line (":", line);
if (colon == -1)
break;
- first_byte = atol (line + colon);
+ line_first_byte = atol (line + colon);
/* ignore an entry with a bogus negative offset */
- if (first_byte < 0)
+ if (line_first_byte < 0)
continue;
subfile = xmalloc (sizeof (SUBFILE));
subfile->filename = xmalloc (colon);
strncpy (subfile->filename, line, colon - 1);
subfile->filename[colon - 1] = 0;
- subfile->first_byte = first_byte;
+ subfile->first_byte = line_first_byte;
add_pointer_to_array (subfile, subfiles_index, subfiles,
subfiles_slots, 10);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * info/nodes.c (SUBFILE): turn first_byte field to size_t as it is certain that it is positive now.,
Patrice Dumas <=