mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Make no_str in charsets.c an array rather than a pointer variable.
This ensures that no other string can have the same address. It probably never was a problem though, because the strings to which it can be compared either are allocated from the heap or are in strings[][] which already has unshared storage.
This commit is contained in:
parent
161b46a479
commit
2434c180f2
@ -118,8 +118,11 @@ free_translation_table(struct conv_table *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* A string used in conversion tables when there is no correct
|
/* A string used in conversion tables when there is no correct
|
||||||
* conversion. */
|
* conversion. This is compared by address and therefore should be a
|
||||||
static unsigned char *no_str = "*";
|
* named array rather than a pointer so that it won't share storage
|
||||||
|
* with any other string literal that happens to have the same
|
||||||
|
* characters. */
|
||||||
|
static unsigned char no_str[] = "*";
|
||||||
|
|
||||||
static void
|
static void
|
||||||
new_translation_table(struct conv_table *p)
|
new_translation_table(struct conv_table *p)
|
||||||
|
Loading…
Reference in New Issue
Block a user