diff options
Diffstat (limited to 'src/os/object/xdrinput.cc')
-rw-r--r-- | src/os/object/xdrinput.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/os/object/xdrinput.cc b/src/os/object/xdrinput.cc index e722fdd..c98c110 100644 --- a/src/os/object/xdrinput.cc +++ b/src/os/object/xdrinput.cc @@ -1,3 +1,8 @@ +/* + * Copyright 2020 Daniel Friesel + * + * SPDX-License-Identifier: BSD-2-Clause + */ #include "object/xdrinput.h" uint32_t XDRInput::get_uint32() @@ -41,7 +46,7 @@ float XDRInput::get_float() uint32_t i; float f; } v; - // Setting one member of a struct and then reading another is undefined + // Setting one member of a union and then reading another is undefined // behaviour, but works as intended in nearly any (embedded) compiler v.i = get_uint32(); return v.f; @@ -53,7 +58,7 @@ double XDRInput::get_double() uint64_t i; double d; } v; - // Setting one member of a struct and then reading another is undefined + // Setting one member of a union and then reading another is undefined // behaviour, but works as intended in nearly any (embedded) compiler v.i = get_uint64(); return v.d; |