diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-12-08 18:19:13 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-12-08 18:19:13 +0100 |
commit | 812899797d6d8ea773bf960cd74680d20043c5a4 (patch) | |
tree | 470bb05de36285e9f8b86fa34daebd163e3860ed /src/os/object/xdrstream.cc | |
parent | e1526bb2c84b315c72a089dbb50447183d4b1685 (diff) |
add licensing information
Diffstat (limited to 'src/os/object/xdrstream.cc')
-rw-r--r-- | src/os/object/xdrstream.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/os/object/xdrstream.cc b/src/os/object/xdrstream.cc index f0c9365..9dc5a1b 100644 --- a/src/os/object/xdrstream.cc +++ b/src/os/object/xdrstream.cc @@ -1,3 +1,8 @@ +/* + * Copyright 2020 Daniel Friesel + * + * SPDX-License-Identifier: BSD-2-Clause + */ #include "object/xdrstream.h" XDRStream & XDRStream::operator<<(unsigned char c) @@ -87,7 +92,7 @@ XDRStream & XDRStream::operator<<(double number) 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.d = number; *this << v.i; @@ -128,14 +133,12 @@ XDRStream & XDRStream::operator<<(XDRStream & (*fkt) (XDRStream &)) return fkt(*this); } -// FLUSH XDRStream & flush(XDRStream & os) { os.flush(); return os; } -// TERM: null-termination XDRStream & term(XDRStream & os) { os.put('\0'); |