MIME-Version: 1.0 References: <20200902133755.308-1-lstipakov@...277...> In-Reply-To: From: Lev Stipakov Date: Wed, 2 Sep 2020 16:53:57 +0300 Message-ID: Subject: Re: [Openvpn-devel] [PATCH] openvpnmsica: make adapter renaming non-fatal List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit To: Selva Nair Cc: openvpn-devel , Lev Stipakov Hi, >> if (dwResult != ERROR_SUCCESS) >> { >> - tap_delete_adapter(NULL, &guidAdapter, &bRebootRequired); >> + /* failed renaming is not a fatal error, continue */ >> + dwResult = ERROR_SUCCESS; > > > This looks strange. If we are going to rewrite dwResult, why set it and check it at all, just call > tap_set_adapter() without storing the return value and add the comment. I think this is good for documentation purposes - that we are aware that function may fail, but in this case it is not fatal and we continue. > Or, better, print a warning message saying the rename failed. Warning is printed inside tap_delete_adapter(). -- -Lev