Skip to content

Commit b323ebe

Browse files
committed
Bulk Fix of CRT Acrolinx issues, 20 of N
1 parent cda0bf8 commit b323ebe

25 files changed

Lines changed: 54 additions & 56 deletions

docs/c-runtime-library/reference/mkdir-wmkdir.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ Path for a new directory.
3535

3636
Each of these functions returns the value 0 if the new directory was created. On an error, the function returns -1 and sets `errno` as follows.
3737

38-
`EEXIST` Directory was not created because *`dirname`* is the name of an existing file, directory, or device.
38+
`EEXIST` Directory wasn't created because *`dirname`* is the name of an existing file, directory, or device.
3939

40-
`ENOENT` Path was not found.
40+
`ENOENT` Path wasn't found.
4141

4242
For more information about these and other return codes, see [`errno`, `_doserrno`, `_sys_errlist`, and `_sys_nerr`](../errno-doserrno-sys-errlist-and-sys-nerr.md).
4343

4444
## Remarks
4545

46-
The **`_mkdir`** function creates a new directory with the specified *`dirname`*. **`_mkdir`** can create only one new directory per call, so only the last component of *`dirname`* can name a new directory. **`_mkdir`** does not translate path delimiters. In Windows NT, both the backslash ( \\) and the forward slash (/ ) are valid path delimiters in character strings in run-time routines.
46+
The **`_mkdir`** function creates a new directory with the specified *`dirname`*. **`_mkdir`** can create only one new directory per call, so only the last component of *`dirname`* can name a new directory. **`_mkdir`** doesn't translate path delimiters. In Windows NT, both the backslash (**`\`**) and the forward slash (**`/`**) are valid path delimiters in character strings in run-time routines.
4747

4848
**`_wmkdir`** is a wide-character version of **`_mkdir`**; the *`dirname`* argument to **`_wmkdir`** is a wide-character string. **`_wmkdir`** and **`_mkdir`** behave identically otherwise.
4949

docs/c-runtime-library/reference/mktemp-s-wmktemp-s.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.assetid: 92a7e269-7f3d-4c71-bad6-14bc827a451d
1212
---
1313
# `_mktemp_s`, `_wmktemp_s`
1414

15-
Creates a unique file name. These are versions of [`_mktemp`, `_wmktemp`](mktemp-wmktemp.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md).
15+
Creates a unique file name. These functions are versions of [`_mktemp`, `_wmktemp`](mktemp-wmktemp.md) with security enhancements as described in [Security features in the CRT](../security-features-in-the-crt.md).
1616

1717
## Syntax
1818

@@ -53,13 +53,13 @@ Both of these functions return zero on success; an error code on failure.
5353
|----------------|-------------------|----------------------|-------------------------------|
5454
|`NULL`|any|`EINVAL`|`NULL`|
5555
|Incorrect format (see Remarks section for correct format)|any|`EINVAL`|empty string|
56-
|any|<= number of X's|`EINVAL`|empty string|
56+
|any|<= number of X characters|`EINVAL`|empty string|
5757

5858
If any of the above error conditions occurs, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, `errno` is set to `EINVAL` and the functions returns `EINVAL`.
5959

6060
## Remarks
6161

62-
The **`_mktemp_s`** function creates a unique file name by modifying the *`nameTemplate`* argument, so that after the call, the *`nameTemplate`* pointer points to a string containing the new file name. **`_mktemp_s`** automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use by the run-time system. **`_wmktemp_s`** is a wide-character version of **`_mktemp_s`**; the argument of **`_wmktemp_s`** is a wide-character string. **`_wmktemp_s`** and **`_mktemp_s`** behave identically otherwise, except that **`_wmktemp_s`** does not handle multibyte-character strings.
62+
The **`_mktemp_s`** function creates a unique file name by modifying the *`nameTemplate`* argument, so that after the call, the *`nameTemplate`* pointer points to a string containing the new file name. **`_mktemp_s`** automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use by the run-time system. **`_wmktemp_s`** is a wide-character version of **`_mktemp_s`**; the argument of **`_wmktemp_s`** is a wide-character string. **`_wmktemp_s`** and **`_mktemp_s`** behave identically otherwise, except that **`_wmktemp_s`** doesn't handle multibyte-character strings.
6363

6464
The debug library versions of these functions first fill the buffer with 0xFE. To disable this behavior, use [`_CrtSetDebugFillThreshold`](crtsetdebugfillthreshold.md).
6565

@@ -71,7 +71,7 @@ By default, this function's global state is scoped to the application. To change
7171
|---------------------|--------------------------------------|--------------------|-----------------------|
7272
|`_tmktemp_s`|**`_mktemp_s`**|**`_mktemp_s`**|**`_wmktemp_s`**|
7373

74-
The *`nameTemplate`* argument has the form *`baseXXXXXX`*, where *`base`* is the part of the new file name that you supply and each X is a placeholder for a character supplied by **`_mktemp_s`**. Each placeholder character in *`nameTemplate`* must be an uppercase X. **`_mktemp_s`** preserves *`base`* and replaces the first trailing X with an alphabetic character. **`_mktemp_s`** replaces the following trailing X's with a five-digit value; this value is a unique number identifying the calling process, or in multithreaded programs, the calling thread.
74+
The *`nameTemplate`* argument has the form *`baseXXXXXX`*, where *`base`* is the part of the new file name that you supply and each X is a placeholder for a character supplied by **`_mktemp_s`**. Each placeholder character in *`nameTemplate`* must be an uppercase X. **`_mktemp_s`** preserves *`base`* and replaces the first trailing X with an alphabetic character. **`_mktemp_s`** replaces the X characters that follow with a five-digit value. This value is a unique number that identifies the calling process, or in multithreaded programs, the calling thread.
7575

7676
Each successful call to **`_mktemp_s`** modifies *`nameTemplate`*. In each subsequent call from the same process or thread with the same *`nameTemplate`* argument, **`_mktemp_s`** checks for file names that match names returned by **`_mktemp_s`** in previous calls. If no file exists for a given name, **`_mktemp_s`** returns that name. If files exist for all previously returned names, **`_mktemp_s`** creates a new name by replacing the alphabetic character it used in the previously returned name with the next available lowercase letter, in order, from 'a' through 'z'. For example, if *`base`* is:
7777

@@ -85,7 +85,7 @@ If this name is used to create file FNA12345 and this file still exists, the nex
8585

8686
> **`fnb12345`**
8787
88-
If FNA12345 does not exist, the next name returned is again:
88+
If FNA12345 doesn't exist, the next name returned is again:
8989

9090
> **`fna12345`**
9191

docs/c-runtime-library/reference/mktemp-wmktemp.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Each of these functions returns a pointer to the modified nameTemplate. The func
4444

4545
## Remarks
4646

47-
The **`_mktemp`** function creates a unique file name by modifying the *`nameTemplate`* argument. **`_mktemp`** automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use by the run-time system. **`_wmktemp`** is a wide-character version of **`_mktemp`**; the argument and return value of **`_wmktemp`** are wide-character strings. **`_wmktemp`** and **`_mktemp`** behave identically otherwise, except that **`_wmktemp`** does not handle multibyte-character strings.
47+
The **`_mktemp`** function creates a unique file name by modifying the *`nameTemplate`* argument. **`_mktemp`** automatically handles multibyte-character string arguments as appropriate, recognizing multibyte-character sequences according to the multibyte code page currently in use by the run-time system. **`_wmktemp`** is a wide-character version of **`_mktemp`**; the argument and return value of **`_wmktemp`** are wide-character strings. **`_wmktemp`** and **`_mktemp`** behave identically otherwise, except that **`_wmktemp`** doesn't handle multibyte-character strings.
4848

4949
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
5050

@@ -54,7 +54,7 @@ By default, this function's global state is scoped to the application. To change
5454
|---------------------|--------------------------------------|--------------------|-----------------------|
5555
|`_tmktemp`|**`_mktemp`**|**`_mktemp`**|**`_wmktemp`**|
5656

57-
The *`nameTemplate`* argument has the form *`baseXXXXXX`*, where *`base`* is the part of the new file name that you supply and each X is a placeholder for a character supplied by **`_mktemp`**. Each placeholder character in *`nameTemplate`* must be an uppercase X. **`_mktemp`** preserves *`base`* and replaces the first trailing X with an alphabetic character. **`_mktemp`** replaces the following trailing X's with a five-digit value; this value is a unique number identifying the calling process, or in multithreaded programs, the calling thread.
57+
The *`nameTemplate`* argument has the form *`baseXXXXXX`*, where *`base`* is the part of the new file name that you supply and each X is a placeholder for a character supplied by **`_mktemp`**. Each placeholder character in *`nameTemplate`* must be an uppercase X. **`_mktemp`** preserves *`base`* and replaces the first trailing X with an alphabetic character. **`_mktemp`** replaces the trailing X characters with a five-digit value. This value is a unique number that identifies the calling process, or in multithreaded programs, the calling thread.
5858

5959
Each successful call to **`_mktemp`** modifies *`nameTemplate`*. In each subsequent call from the same process or thread with the same *`nameTemplate`* argument, **`_mktemp`** checks for file names that match names returned by **`_mktemp`** in previous calls. If no file exists for a given name, **`_mktemp`** returns that name. If files exist for all previously returned names, **`_mktemp`** creates a new name by replacing the alphabetic character it used in the previously returned name with the next available lowercase letter, in order, from 'a' through 'z'. For example, if *`base`* is:
6060

@@ -68,13 +68,13 @@ If this name is used to create file FNA12345 and this file still exists, the nex
6868

6969
> **`fnb12345`**
7070
71-
If FNA12345 does not exist, the next name returned is again:
71+
If FNA12345 doesn't exist, the next name returned is again:
7272

7373
> **`fna12345`**
7474
7575
**`_mktemp`** can create a maximum of 26 unique file names for any given combination of *`base`* and *`nameTemplate`* values. Therefore, FNZ12345 is the last unique file name **`_mktemp`** can create for the *`base`* and *`nameTemplate`* values used in this example.
7676

77-
On failure, `errno` is set. If *`nameTemplate`* has an invalid format (for example, fewer than 6 X's), `errno` is set to `EINVAL`. If **`_mktemp`** is unable to create a unique name because all 26 possible file names already exist, **`_mktemp`** sets nameTemplate to an empty string and returns `EEXIST`.
77+
On failure, `errno` is set. If *`nameTemplate`* has an invalid format (for example, fewer than six X characters), `errno` is set to `EINVAL`. If **`_mktemp`** is unable to create a unique name because all 26 possible file names already exist, **`_mktemp`** sets nameTemplate to an empty string and returns `EEXIST`.
7878

7979
In C++, these functions have template overloads that invoke the newer, secure counterparts of these functions. For more information, see [Secure template overloads](../secure-template-overloads.md).
8080

docs/c-runtime-library/reference/mktime-mktime32-mktime64.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The **`mktime`**, **`_mktime32`** and **`_mktime64`** functions convert the supp
4444

4545
**`mktime`** is an inline function that is equivalent to **`_mktime64`**, unless `_USE_32BIT_TIME_T` is defined, in which case it's equivalent to **`_mktime32`**.
4646

47-
After an adjustment to UTC, **`_mktime32`** handles dates from midnight, January 1, 1970, to 23:59:59 January 18, 2038, UTC. **`_mktime64`** handles dates from midnight, January 1, 1970 to 23:59:59, December 31, 3000. This adjustment may cause these functions to return -1 (cast to **`time_t`**, **`__time32_t`** or **`__time64_t`**) even though the date you specify is within range. For example, if you are in Cairo, Egypt, which is two hours ahead of UTC, two hours will first be subtracted from the date you specify in *`timeptr`*; this may now put your date out of range.
47+
After an adjustment to UTC, **`_mktime32`** handles dates from midnight, January 1, 1970, to 23:59:59 January 18, 2038, UTC. **`_mktime64`** handles dates from midnight, January 1, 1970 to 23:59:59, December 31, 3000. This adjustment may cause these functions to return -1 (cast to **`time_t`**, **`__time32_t`** or **`__time64_t`**) even though the date you specify is within range. For example, if you are in Cairo, Egypt, which is two hours ahead of UTC, two hours will first be subtracted from the date you specify in *`timeptr`*; the subtraction may now put your date out of range.
4848

4949
These functions may be used to validate and fill in a `tm` structure. If successful, these functions set the values of **`tm_wday`** and **`tm_yday`** as appropriate and set the other components to represent the specified calendar time, but with their values forced to the normal ranges. The final value of **`tm_mday`** isn't set until **`tm_mon`** and **`tm_year`** are determined. When specifying a **`tm`** structure time, set the **`tm_isdst`** field to:
5050

@@ -54,9 +54,9 @@ These functions may be used to validate and fill in a `tm` structure. If success
5454

5555
- A value less than zero to have the C run-time library code compute whether standard time or daylight saving time is in effect.
5656

57-
The C run-time library will determine the daylight savings time behavior from the [`TZ`](tzset.md) environment variable. If **`TZ`** isn't set, the Win32 API call [`GetTimeZoneInformation`](/windows/win32/api/timezoneapi/nf-timezoneapi-gettimezoneinformation) is used to get the daylight savings time information from the operating system. If this fails, the library assumes the United States' rules for implementing the calculation of daylight saving time are used. **`tm_isdst`** is a required field. If not set, its value is undefined and the return value from these functions is unpredictable. If *`timeptr`* points to a **`tm`** structure returned by a previous call to [`asctime`](asctime-wasctime.md), [`gmtime`](gmtime-gmtime32-gmtime64.md), or [`localtime`](localtime-localtime32-localtime64.md) (or variants of these functions), the **`tm_isdst`** field contains the correct value.
57+
The C run-time library will determine the daylight savings time behavior from the [`TZ`](tzset.md) environment variable. If **`TZ`** isn't set, the Win32 API call [`GetTimeZoneInformation`](/windows/win32/api/timezoneapi/nf-timezoneapi-gettimezoneinformation) is used to get the daylight savings time information from the operating system. If the call fails, the library assumes the United States' rules for implementing the calculation of daylight saving time are used. **`tm_isdst`** is a required field. If not set, its value is undefined and the return value from these functions is unpredictable. If *`timeptr`* points to a **`tm`** structure returned by a previous call to [`asctime`](asctime-wasctime.md), [`gmtime`](gmtime-gmtime32-gmtime64.md), or [`localtime`](localtime-localtime32-localtime64.md) (or variants of these functions), the **`tm_isdst`** field contains the correct value.
5858

59-
Note that **`gmtime`** and **`localtime`** (and **`_gmtime32`**, **`_gmtime64`**, **`_localtime32`**, and **`_localtime64`**) use a single buffer per thread for the conversion. If you supply this buffer to **`mktime`**, **`_mktime32`** or **`_mktime64`**, the previous contents are destroyed.
59+
The **`gmtime`** and **`localtime`** (and **`_gmtime32`**, **`_gmtime64`**, **`_localtime32`**, and **`_localtime64`**) functions use a single buffer per thread for the conversion. If you supply this buffer to **`mktime`**, **`_mktime32`** or **`_mktime64`**, the previous contents are destroyed.
6060

6161
These functions validate their parameter. If *`timeptr`* is a null pointer, the invalid parameter handler is invoked, as described in [Parameter validation](../parameter-validation.md). If execution is allowed to continue, the functions return -1 and set `errno` to `EINVAL`.
6262

docs/c-runtime-library/reference/msize-dbg.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ On successful completion, **`_msize_dbg`** returns the size (in bytes) of the sp
3737

3838
## Remarks
3939

40-
**`_msize_dbg`** is a debug version of the _[`msize`](msize.md) function. When [`_DEBUG`](../debug.md) is not defined, each call to **`_msize_dbg`** is reduced to a call to `_msize`. Both `_msize` and **`_msize_dbg`** calculate the size of a memory block in the base heap, but **`_msize_dbg`** adds two debugging features: It includes the buffers on either side of the user portion of the memory block in the returned size and it allows size calculations for specific block types.
40+
**`_msize_dbg`** is a debug version of the _[`msize`](msize.md) function. When [`_DEBUG`](../debug.md) isn't defined, each call to **`_msize_dbg`** is reduced to a call to `_msize`. Both `_msize` and **`_msize_dbg`** calculate the size of a memory block in the base heap, but **`_msize_dbg`** adds two debugging features: It includes the buffers on either side of the user portion of the memory block in the returned size and it allows size calculations for specific block types.
4141

42-
For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they are used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between calling a standard heap function and its debug version in a debug build of an application, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions).
42+
For information about how memory blocks are allocated, initialized, and managed in the debug version of the base heap, see [CRT debug heap details](/visualstudio/debugger/crt-debug-heap-details). For information about the allocation block types and how they're used, see [Types of blocks on the debug heap](/visualstudio/debugger/crt-debug-heap-details). For information about the differences between standard heap functions and the debug versions, see [Debug versions of heap allocation functions](/visualstudio/debugger/debug-versions-of-heap-allocation-functions).
4343

4444
This function validates its parameter. If *`memblock`* is a null pointer, **`_msize_dbg`** invokes an invalid parameter handler, as described in [Parameter validation](../parameter-validation.md). If the error is handled, the function sets `errno` to `EINVAL` and returns -1.
4545

docs/c-runtime-library/reference/nearbyint-nearbyintf-nearbyintl1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ If successful, returns *`x`*, rounded to the nearest integer, using the current
4141
|*`x`* = ±0|±0, unmodified|
4242
|*`x`* = NaN|NaN|
4343
44-
Errors are not reported through [`_matherr`](matherr.md); specifically, this function does not report any `FE_INEXACT` exceptions.
44+
Errors aren't reported through [`_matherr`](matherr.md); specifically, this function doesn't report any `FE_INEXACT` exceptions.
4545
4646
## Remarks
4747
48-
The primary difference between this function and [`rint`](rint-rintf-rintl.md) is that this function does not raise the inexact floating point exception.
48+
The primary difference between this function and [`rint`](rint-rintf-rintl.md) is that this function doesn't raise the inexact floating point exception.
4949
5050
Because the maximum floating-point values are exact integers, this function will never overflow by itself; rather, the output may overflow the return value, depending on which version of the function you use.
5151

0 commit comments

Comments
 (0)