summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2023-03-07 10:03:43 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2023-03-07 10:03:43 -0400
commit21f6f42741b7244dd5a145361ecba80456647fc4 (patch)
tree0caf9262d2c1ee8a2a4d8731da77f62e24c4d963
parent94c69b351d3bd49d4856b20c22c9fb420fcaece0 (diff)
TTcpSocket: Remove unnecessary local variables
-rw-r--r--src/pso/TTcpSocket.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/pso/TTcpSocket.cpp b/src/pso/TTcpSocket.cpp
index e923abb..beb5565 100644
--- a/src/pso/TTcpSocket.cpp
+++ b/src/pso/TTcpSocket.cpp
@@ -99,8 +99,7 @@ int TTcpSocket::send(u8 *data, size_t size) {
m_send_crypt.encrypt(data, size);
}
- const s8 flags = is_invalid_packet();
- if (flags || !get_link_status()) {
+ if (is_invalid_packet() || !get_link_status()) {
return -1;
} else {
if (int status = stat()) {
@@ -138,8 +137,7 @@ int TTcpSocket::send(u8 *data, size_t size) {
short TTcpSocket::send(u8 *data) {
if (sock_fd() != -1) {
- const s8 flags = is_invalid_packet();
- if (flags || !get_link_status()) {
+ if (is_invalid_packet() || !get_link_status()) {
return -1;
} else {
if (short status = stat()) {