summaryrefslogtreecommitdiffstats
path: root/cpukit/dtc/libfdt/fdt_addresses.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2017-02-24 10:51:05 +1100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-07-19 07:01:10 +0200
commit6dbbd277d900c2d8fc1be7b0c60e82843c554418 (patch)
tree7bd19bdf100994c919eb9c20371bc01369d82de2 /cpukit/dtc/libfdt/fdt_addresses.c
parentlibfdt: add missing errors to fdt_strerror() (diff)
downloadrtems-6dbbd277d900c2d8fc1be7b0c60e82843c554418.tar.bz2
libfdt: Remove undefined behaviour setting empty properties
The standard way of setting an empty property using libfdt is: fdt_setprop(fdt, nodeoffset, propname, NULL, 0); However, the implementation of this includes an unconditional: memcpy(prop->data, NULL, 0); Which although it will be a no-op (which is what we want) on many platforms is technically undefined behaviour. Correct this, so that when passing a 0 length, passing a NULL pointer as the value to fdt_setprop() is definitely safe. This should quiet static checkers which complain about this. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'cpukit/dtc/libfdt/fdt_addresses.c')
0 files changed, 0 insertions, 0 deletions