mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-06 10:12:38 +02:00
interim fix for generic list functions to avoid pointer aliasing issues; documentation updates
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
/* stringlist.c - functions to handle a generic `list of strings' structure */
|
||||
|
||||
/* Copyright (C) 2000-2019, 2022-2023 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000-2019, 2022-2026 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -253,7 +253,7 @@ strlist_from_word_list (WORD_LIST *list, int alloc, int starting_index, int *ip)
|
||||
*ip = 0;
|
||||
return ((STRINGLIST *)0);
|
||||
}
|
||||
slen = list_length ((GENERIC_LIST *)list);
|
||||
slen = wlist_length (list);
|
||||
ret = (STRINGLIST *)xmalloc (sizeof (STRINGLIST));
|
||||
ret->list = strvec_from_word_list (list, alloc, starting_index, &len);
|
||||
ret->list_size = slen + starting_index;
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/* stringvec.c - functions for managing arrays of strings. */
|
||||
|
||||
/* Copyright (C) 2000-2002,2022-2024 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000-2002,2022-2026 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Bash, the Bourne Again SHell.
|
||||
|
||||
@@ -206,7 +206,7 @@ strvec_from_word_list (WORD_LIST *list, int alloc, int starting_index, int *ip)
|
||||
size_t count;
|
||||
char **array;
|
||||
|
||||
count = list_length ((GENERIC_LIST *)list);
|
||||
count = wlist_length (list);
|
||||
array = (char **)xmalloc ((1 + count + starting_index) * sizeof (char *));
|
||||
|
||||
for (count = 0; count < starting_index; count++)
|
||||
|
||||
Reference in New Issue
Block a user