Skip to content

Commit 470bd39

Browse files
Trottjasnell
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 0812ebd commit 470bd39

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

doc/api/buffer.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,7 +1591,7 @@ endian format (`readDoubleBE()` returns big endian, `readDoubleLE()` returns
15911591
little endian).
15921592

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

15961596
Examples:
15971597

@@ -1627,7 +1627,7 @@ endian format (`readFloatBE()` returns big endian, `readFloatLE()` returns
16271627
little endian).
16281628

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

16321632
Examples:
16331633

@@ -1660,7 +1660,7 @@ added: v0.5.0
16601660
Reads a signed 8-bit integer from `buf` at the specified `offset`.
16611661

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

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

@@ -1694,7 +1694,7 @@ the specified endian format (`readInt16BE()` returns big endian,
16941694
`readInt16LE()` returns little endian).
16951695

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

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

@@ -1728,7 +1728,7 @@ the specified endian format (`readInt32BE()` returns big endian,
17281728
`readInt32LE()` returns little endian).
17291729

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

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

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

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

17681768
Examples:
17691769

@@ -1795,7 +1795,7 @@ added: v0.5.0
17951795
Reads an unsigned 8-bit integer from `buf` at the specified `offset`.
17961796

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

18001800
Examples:
18011801

@@ -1827,7 +1827,7 @@ specified endian format (`readUInt16BE()` returns big endian, `readUInt16LE()`
18271827
returns little endian).
18281828

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

18321832
Examples:
18331833

@@ -1865,7 +1865,7 @@ specified endian format (`readUInt32BE()` returns big endian,
18651865
`readUInt32LE()` returns little endian).
18661866

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

18701870
Examples:
18711871

@@ -1898,7 +1898,7 @@ and interprets the result as an unsigned integer. Supports up to 48
18981898
bits of accuracy.
18991899

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

19031903
Examples:
19041904

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

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

22412241
Examples:
22422242

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

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

22762276
Examples:
22772277

@@ -2304,7 +2304,7 @@ signed 8-bit integer. Behavior is undefined when `value` is anything other than
23042304
a signed 8-bit integer.
23052305

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

23092309
`value` is interpreted and written as a two's complement signed integer.
23102310

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

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

23422342
`value` is interpreted and written as a two's complement signed integer.
23432343

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

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

23752375
`value` is interpreted and written as a two's complement signed integer.
23762376

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

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

24092409
Examples:
24102410

@@ -2437,7 +2437,7 @@ valid unsigned 8-bit integer. Behavior is undefined when `value` is anything
24372437
other than an unsigned 8-bit integer.
24382438

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

24422442
Examples:
24432443

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

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

24752475
Examples:
24762476

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

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

25122512
Examples:
25132513

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

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

25482548
Examples:
25492549

0 commit comments

Comments
 (0)