mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-01-18 16:25:05 +08:00
constipate the "str" argument to bsi() and bsii()
The string argument to bsi() and bsii() should be const.
This commit is contained in:
parent
5fbbc8c2e7
commit
c84f1b927b
@ -785,7 +785,7 @@ const char *prefix_name(int token)
|
||||
/*
|
||||
* Binary search.
|
||||
*/
|
||||
int bsi(char *string, const char **array, int size)
|
||||
int bsi(const char *string, const char **array, int size)
|
||||
{
|
||||
int i = -1, j = size; /* always, i < index < j */
|
||||
while (j - i >= 2) {
|
||||
@ -801,7 +801,7 @@ int bsi(char *string, const char **array, int size)
|
||||
return -1; /* we haven't got it :( */
|
||||
}
|
||||
|
||||
int bsii(char *string, const char **array, int size)
|
||||
int bsii(const char *string, const char **array, int size)
|
||||
{
|
||||
int i = -1, j = size; /* always, i < index < j */
|
||||
while (j - i >= 2) {
|
||||
|
@ -304,8 +304,8 @@ void saa_fpwrite(struct SAA *, FILE *);
|
||||
*
|
||||
* bsi() is case sensitive, bsii() is case insensitive.
|
||||
*/
|
||||
int bsi(char *string, const char **array, int size);
|
||||
int bsii(char *string, const char **array, int size);
|
||||
int bsi(const char *string, const char **array, int size);
|
||||
int bsii(const char *string, const char **array, int size);
|
||||
|
||||
char *src_set_fname(char *newname);
|
||||
int32_t src_set_linnum(int32_t newline);
|
||||
|
Loading…
Reference in New Issue
Block a user