Skip to content

Commit 1e59422

Browse files
Update documentation for hasDuplicates
1 parent 312841a commit 1e59422

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

C/rsort.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@ _Static_assert(UCHAR_MAX < SIZE_MAX, "UCHAR_MAX >= SIZE_MAX");
1414
/* Internal function used by 'hasDuplicates'. Do not call directly. */
1515
const sha256_midstate* rsort(size_t* scratch, const sha256_midstate** a, size_t len, size_t level);
1616

17-
/* Searches for duplicates in an array of pointers to 'sha256_midstate's.
17+
/* Searches for duplicates in an array of 'sha256_midstate's.
1818
* If 'true' is returned, '*duplicates' is set according to whether duplicate 'sha256_midstate' values were found.
19-
* If 'true' is returned, the array is also wiped, with all pointers set to NULL.
20-
* If malloc fails, false is returned and '*duplicates' and the array are unchanged.
19+
* If malloc fails, false is returned and '*duplicates' is unchanged.
2120
*
2221
* Precondition: NULL != duplicates;
2322
* const sha256_midstate a[len];
24-
* Postcondition: If 'true' is returned then for all 0 <= i < len, NULL == a[i];
2523
*/
2624
static inline bool hasDuplicates(bool* duplicates, const sha256_midstate* a, size_t len) {
2725
_Static_assert(sizeof(a->s) * CHAR_BIT == 256, "sha256_midstate.s has unnamed padding");

0 commit comments

Comments
 (0)