diff options
author | Congcong Kuo <congcong.kuo@gmail.com> | 2025-07-06 22:51:34 +0800 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2025-07-16 23:50:38 +0200 |
commit | bd963ec99d5232df789b20e19b47900b1e27d7e3 (patch) | |
tree | e5709ff39eea8d68405389db62f0d9fa48f31595 /nix/libutil/util.hh | |
parent | 02a94e80243b1ed1f84fc3cce2554f2d06fd1664 (diff) |
daemon: Use std::string or std::vector instead of variable-length array (VLA).
* libutil/util.h (waitForMessage): Use std::string instead of char* to unify coding style.
* libutil/util.cc (waitForMessage): Use std::string instead of variable-length array (VLA).
(readLink, copyFileRecursively, expect): Use std::vector instead of VLA.
* libutil/hash.cc (printHash): Use std::vector instead of VLA.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'nix/libutil/util.hh')
-rw-r--r-- | nix/libutil/util.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nix/libutil/util.hh b/nix/libutil/util.hh index 648d6f19a4..7b50dfa5f5 100644 --- a/nix/libutil/util.hh +++ b/nix/libutil/util.hh @@ -179,7 +179,7 @@ MakeError(EndOfFile, Error) /* Read a file descriptor until EOF occurs. */ string drainFD(int fd); -void waitForMessage(int fd, const char *message); +void waitForMessage(int fd, const string & message); |