-/* Copyright (c) 2014-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2014-2023. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
xbt_assert(c > 0, "Could not read string from remote process");
if (memchr(res.data() + off, '\0', c))
- return std::string(res.data());
+ return res.data();
off += c;
if (off == (off_t)res.size())