[adb] generic "cast_handle_to_int" function
Now one can use it without platform #ifdefs
Bug: 150183149
Test: compiles
Change-Id: I6280dcdd2faaff33014f11237d9d04231ac16b82
diff --git a/adb/transport.cpp b/adb/transport.cpp
index ed4a93b..6dccb7f 100644
--- a/adb/transport.cpp
+++ b/adb/transport.cpp
@@ -500,12 +500,8 @@
auto x509 = GenerateX509Certificate(evp_pkey.get());
auto x509_str = X509ToPEMString(x509.get());
auto evp_str = Key::ToPEMString(evp_pkey.get());
-#ifdef _WIN32
- int osh = cast_handle_to_int(adb_get_os_handle(fd_));
-#else
- int osh = adb_get_os_handle(fd_);
-#endif
+ int osh = cast_handle_to_int(adb_get_os_handle(fd_));
#if ADB_HOST
tls_ = TlsConnection::Create(TlsConnection::Role::Client,
#else