Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/common/lib/libc/string


"Joerg Sonnenberger" <> wrote:
 |Module Name:  src
 |Committed By: joerg
 |Date:         Mon Apr 14 18:18:58 UTC 2014
 |Modified Files:
 | src/common/lib/libc/string: bcopy.c
 |Log Message:
 |Using bcopy/memcpy with NULL arguments is valid as long as the size is
 |also 0.

This is great interface design and easy to use, but it is not
specified in neither POSIX nor ISO C (11).
And worse i'm afraid that the ISO C people would actively veto
this very behaviour given that wmemcpy(3) is standardized as

  If n is zero, the application shall ensure that ws1 and ws2 are
  valid pointers, and the function shall copy zero wide


Home | Main Index | Thread Index | Old Index