Skip to content

Commit 838f7bd

Browse files
TrottMylesBorins
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 37071b8 commit 838f7bd

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
@@ -1442,7 +1442,7 @@ endian format (`readDoubleBE()` returns big endian, `readDoubleLE()` returns
14421442
little endian).
14431443

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

14471447
Examples:
14481448

@@ -1479,7 +1479,7 @@ endian format (`readFloatBE()` returns big endian, `readFloatLE()` returns
14791479
little endian).
14801480

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

14841484
Examples:
14851485

@@ -1513,7 +1513,7 @@ added: v0.5.0
15131513
Reads a signed 8-bit integer from `buf` at the specified `offset`.
15141514

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

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

@@ -1548,7 +1548,7 @@ the specified endian format (`readInt16BE()` returns big endian,
15481548
`readInt16LE()` returns little endian).
15491549

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

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

@@ -1583,7 +1583,7 @@ the specified endian format (`readInt32BE()` returns big endian,
15831583
`readInt32LE()` returns 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
Integers read from a `Buffer` are interpreted as two's complement signed values.
15891589

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

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

16261626
Examples:
16271627

@@ -1650,7 +1650,7 @@ added: v0.5.0
16501650
Reads an unsigned 8-bit integer from `buf` at the specified `offset`.
16511651

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

16551655
Examples:
16561656

@@ -1683,7 +1683,7 @@ specified endian format (`readUInt16BE()` returns big endian, `readUInt16LE()`
16831683
returns little endian).
16841684

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

16881688
Examples:
16891689

@@ -1722,7 +1722,7 @@ specified endian format (`readUInt32BE()` returns big endian,
17221722
`readUInt32LE()` returns little endian).
17231723

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

17271727
Examples:
17281728

@@ -1758,7 +1758,7 @@ and interprets the result as an unsigned integer. Supports up to 48
17581758
bits of accuracy.
17591759

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

17631763
Examples:
17641764

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

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

20882088
Examples:
20892089

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

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

21242124
Examples:
21252125

@@ -2153,7 +2153,7 @@ signed 8-bit integer. Behavior is undefined when `value` is anything other than
21532153
a signed 8-bit integer.
21542154

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

21582158
`value` is interpreted and written as a two's complement signed integer.
21592159

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

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

21922192
`value` is interpreted and written as a two's complement signed integer.
21932193

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

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

22262226
`value` is interpreted and written as a two's complement signed integer.
22272227

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

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

22612261
Examples:
22622262

@@ -2290,7 +2290,7 @@ valid unsigned 8-bit integer. Behavior is undefined when `value` is anything
22902290
other than an unsigned 8-bit integer.
22912291

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

22952295
Examples:
22962296

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

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

23292329
Examples:
23302330

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

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

23672367
Examples:
23682368

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

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

24052405
Examples:
24062406

0 commit comments

Comments
 (0)