diff options
author | Tom de Vries <tdevries@suse.de> | 2024-11-23 12:20:34 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2024-11-23 12:20:34 +0100 |
commit | ac51afb51c00693bb19c6a6110e9a45d2e4f79b7 (patch) | |
tree | b2fcf9ded59d04633dbb406083e2814c34e4e468 /gdb/c-lang.c | |
parent | 63eedf3b09f73077ecff2118f45d1adb1391eddd (diff) | |
download | binutils-ac51afb51c00693bb19c6a6110e9a45d2e4f79b7.zip binutils-ac51afb51c00693bb19c6a6110e9a45d2e4f79b7.tar.gz binutils-ac51afb51c00693bb19c6a6110e9a45d2e4f79b7.tar.bz2 |
[gdb/contrib] Add two rules in common-misspellings.txt
Eli mentioned [1] that given that we use US English spelling in our
documentation, we should use "behavior" instead of "behaviour".
In wikipedia-common-misspellings.txt there's a rule:
...
behavour->behavior, behaviour
...
which leaves this as a choice.
Add an overriding rule to hardcode the choice to common-misspellings.txt:
...
behavour->behavior
...
and add a rule to rewrite behaviour into behavior:
...
behaviour->behavior
...
and re-run spellcheck.sh on gdb*.
Tested on x86_64-linux.
[1] https://sourceware.org/pipermail/gdb-patches/2024-November/213371.html
Diffstat (limited to 'gdb/c-lang.c')
-rw-r--r-- | gdb/c-lang.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/c-lang.c b/gdb/c-lang.c index 24cdde6..c28493f 100644 --- a/gdb/c-lang.c +++ b/gdb/c-lang.c @@ -337,17 +337,17 @@ c_get_string (struct value *value, gdb::unique_xmalloc_ptr<gdb_byte> *buffer, addr = value_as_address (value); /* Prior to the fix for PR 16196 read_string would ignore fetchlimit - if length > 0. The old "broken" behaviour is the behaviour we want: + if length > 0. The old "broken" behavior is the behavior we want: The caller may want to fetch 100 bytes from a variable length array implemented using the common idiom of having an array of length 1 at the end of a struct. In this case we want to ignore the declared size of the array. However, it's counterintuitive to implement that - behaviour in read_string: what does fetchlimit otherwise mean if - length > 0. Therefore we implement the behaviour we want here: + behavior in read_string: what does fetchlimit otherwise mean if + length > 0. Therefore we implement the behavior we want here: If *length > 0, don't specify a fetchlimit. This preserves the - previous behaviour. We could move this check above where we know + previous behavior. We could move this check above where we know whether the array is declared with a fixed size, but we only want - to apply this behaviour when calling read_string. PR 16286. */ + to apply this behavior when calling read_string. PR 16286. */ if (*length > 0) fetchlimit = UINT_MAX; |