From e6b1cf540bca06bb469ba8ae0a25d5618691ad24 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max.kellermann@gmail.com>
Date: Mon, 6 May 2024 18:24:22 +0200
Subject: [PATCH] lib/nfs/Connection: remove unnecessary initializers from
 MountInternal()

---
 src/lib/nfs/Connection.cxx | 7 -------
 src/lib/nfs/Connection.hxx | 6 +++---
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/src/lib/nfs/Connection.cxx b/src/lib/nfs/Connection.cxx
index 876156ffc..2eb9283ca 100644
--- a/src/lib/nfs/Connection.cxx
+++ b/src/lib/nfs/Connection.cxx
@@ -565,17 +565,10 @@ NfsConnection::MountInternal()
 	assert(GetEventLoop().IsInside());
 	assert(mount_state == MountState::INITIAL);
 
-	postponed_mount_error = std::exception_ptr();
 	mount_state = MountState::WAITING;
 
 	mount_timeout_event.Schedule(NFS_MOUNT_TIMEOUT);
 
-#ifndef NDEBUG
-	in_service = false;
-	in_event = false;
-	in_destroy = false;
-#endif
-
 	if (nfs_mount_async(context, server.c_str(), export_name.c_str(),
 			    MountCallback, this) != 0) {
 		mount_state = MountState::FINISHED;
diff --git a/src/lib/nfs/Connection.hxx b/src/lib/nfs/Connection.hxx
index 5d2f61c48..391c5c8c0 100644
--- a/src/lib/nfs/Connection.hxx
+++ b/src/lib/nfs/Connection.hxx
@@ -111,18 +111,18 @@ class NfsConnection {
 	/**
 	 * True when nfs_service() is being called.
 	 */
-	bool in_service;
+	bool in_service = false;
 
 	/**
 	 * True when OnSocketReady() is being called.  During that,
 	 * event updates are omitted.
 	 */
-	bool in_event;
+	bool in_event = false;
 
 	/**
 	 * True when DestroyContext() is being called.
 	 */
-	bool in_destroy;
+	bool in_destroy = false;
 #endif
 
 public: