Skip to content

Commit de70a36

Browse files
Trottevanlucas
authored andcommitted
doc: be less tentative about undefined behavior
In the documentation for the buffer module, change instances of "the result is considered undefined behavior" to "the resulting behavior is undefined". It's less ambiguous in meaning and less awkward stylistically. PR-URL: #18091 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Khaidi Chu <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 96b0722 commit de70a36

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

doc/api/buffer.md

+20-20
Original file line numberDiff line numberDiff line change
@@ -1583,7 +1583,7 @@ endian format (`readDoubleBE()` returns big endian, `readDoubleLE()` returns
15831583
little endian).
15841584

15851585
Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
1586-
the result should be considered undefined behavior.
1586+
the resulting behavior is undefined.
15871587

15881588
Examples:
15891589

@@ -1619,7 +1619,7 @@ endian format (`readFloatBE()` returns big endian, `readFloatLE()` returns
16191619
little endian).
16201620

16211621
Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
1622-
the result should be considered undefined behavior.
1622+
the resulting behavior is undefined.
16231623

16241624
Examples:
16251625

@@ -1652,7 +1652,7 @@ added: v0.5.0
16521652
Reads a signed 8-bit integer from `buf` at the specified `offset`.
16531653

16541654
Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
1655-
the result should be considered undefined behavior.
1655+
the resulting behavior is undefined.
16561656

16571657
Integers read from a `Buffer` are interpreted as two's complement signed values.
16581658

@@ -1686,7 +1686,7 @@ the specified endian format (`readInt16BE()` returns big endian,
16861686
`readInt16LE()` returns little endian).
16871687

16881688
Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
1689-
the result should be considered undefined behavior.
1689+
the resulting behavior is undefined.
16901690

16911691
Integers read from a `Buffer` are interpreted as two's complement signed values.
16921692

@@ -1720,7 +1720,7 @@ the specified endian format (`readInt32BE()` returns big endian,
17201720
`readInt32LE()` returns little endian).
17211721

17221722
Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
1723-
the result should be considered undefined behavior.
1723+
the resulting behavior is undefined.
17241724

17251725
Integers read from a `Buffer` are interpreted as two's complement signed values.
17261726

@@ -1755,7 +1755,7 @@ and interprets the result as a two's complement signed value. Supports up to 48
17551755
bits of accuracy.
17561756

17571757
Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
1758-
the result should be considered undefined behavior.
1758+
the resulting behavior is undefined.
17591759

17601760
Examples:
17611761

@@ -1784,7 +1784,7 @@ added: v0.5.0
17841784
Reads an unsigned 8-bit integer from `buf` at the specified `offset`.
17851785

17861786
Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
1787-
the result should be considered undefined behavior.
1787+
the resulting behavior is undefined.
17881788

17891789
Examples:
17901790

@@ -1816,7 +1816,7 @@ specified endian format (`readUInt16BE()` returns big endian, `readUInt16LE()`
18161816
returns little endian).
18171817

18181818
Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
1819-
the result should be considered undefined behavior.
1819+
the resulting behavior is undefined.
18201820

18211821
Examples:
18221822

@@ -1854,7 +1854,7 @@ specified endian format (`readUInt32BE()` returns big endian,
18541854
`readUInt32LE()` returns little endian).
18551855

18561856
Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
1857-
the result should be considered undefined behavior.
1857+
the resulting behavior is undefined.
18581858

18591859
Examples:
18601860

@@ -1887,7 +1887,7 @@ and interprets the result as an unsigned integer. Supports up to 48
18871887
bits of accuracy.
18881888

18891889
Setting `noAssert` to `true` allows `offset` to be beyond the end of `buf`, but
1890-
the result should be considered undefined behavior.
1890+
the resulting behavior is undefined.
18911891

18921892
Examples:
18931893

@@ -2225,7 +2225,7 @@ endian). `value` *should* be a valid 64-bit double. Behavior is undefined when
22252225
`value` is anything other than a 64-bit double.
22262226

22272227
Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
2228-
the end of `buf`, but the result should be considered undefined behavior.
2228+
the end of `buf`, but the resulting behavior is undefined.
22292229

22302230
Examples:
22312231

@@ -2260,7 +2260,7 @@ endian). `value` *should* be a valid 32-bit float. Behavior is undefined when
22602260
`value` is anything other than a 32-bit float.
22612261

22622262
Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
2263-
the end of `buf`, but the result should be considered undefined behavior.
2263+
the end of `buf`, but the resulting behavior is undefined.
22642264

22652265
Examples:
22662266

@@ -2293,7 +2293,7 @@ signed 8-bit integer. Behavior is undefined when `value` is anything other than
22932293
a signed 8-bit integer.
22942294

22952295
Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
2296-
the end of `buf`, but the result should be considered undefined behavior.
2296+
the end of `buf`, but the resulting behavior is undefined.
22972297

22982298
`value` is interpreted and written as a two's complement signed integer.
22992299

@@ -2326,7 +2326,7 @@ endian). `value` *should* be a valid signed 16-bit integer. Behavior is undefine
23262326
when `value` is anything other than a signed 16-bit integer.
23272327

23282328
Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
2329-
the end of `buf`, but the result should be considered undefined behavior.
2329+
the end of `buf`, but the resulting behavior is undefined.
23302330

23312331
`value` is interpreted and written as a two's complement signed integer.
23322332

@@ -2359,7 +2359,7 @@ endian). `value` *should* be a valid signed 32-bit integer. Behavior is undefine
23592359
when `value` is anything other than a signed 32-bit integer.
23602360

23612361
Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
2362-
the end of `buf`, but the result should be considered undefined behavior.
2362+
the end of `buf`, but the resulting behavior is undefined.
23632363

23642364
`value` is interpreted and written as a two's complement signed integer.
23652365

@@ -2393,7 +2393,7 @@ Supports up to 48 bits of accuracy. Behavior is undefined when `value` is
23932393
anything other than a signed integer.
23942394

23952395
Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
2396-
the end of `buf`, but the result should be considered undefined behavior.
2396+
the end of `buf`, but the resulting behavior is undefined.
23972397

23982398
Examples:
23992399

@@ -2426,7 +2426,7 @@ valid unsigned 8-bit integer. Behavior is undefined when `value` is anything
24262426
other than an unsigned 8-bit integer.
24272427

24282428
Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
2429-
the end of `buf`, but the result should be considered undefined behavior.
2429+
the end of `buf`, but the resulting behavior is undefined.
24302430

24312431
Examples:
24322432

@@ -2459,7 +2459,7 @@ endian). `value` should be a valid unsigned 16-bit integer. Behavior is
24592459
undefined when `value` is anything other than an unsigned 16-bit integer.
24602460

24612461
Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
2462-
the end of `buf`, but the result should be considered undefined behavior.
2462+
the end of `buf`, but the resulting behavior is undefined.
24632463

24642464
Examples:
24652465

@@ -2496,7 +2496,7 @@ endian). `value` should be a valid unsigned 32-bit integer. Behavior is
24962496
undefined when `value` is anything other than an unsigned 32-bit integer.
24972497

24982498
Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
2499-
the end of `buf`, but the result should be considered undefined behavior.
2499+
the end of `buf`, but the resulting behavior is undefined.
25002500

25012501
Examples:
25022502

@@ -2532,7 +2532,7 @@ Supports up to 48 bits of accuracy. Behavior is undefined when `value` is
25322532
anything other than an unsigned integer.
25332533

25342534
Setting `noAssert` to `true` allows the encoded form of `value` to extend beyond
2535-
the end of `buf`, but the result should be considered undefined behavior.
2535+
the end of `buf`, but the resulting behavior is undefined.
25362536

25372537
Examples:
25382538

0 commit comments

Comments
 (0)