Skip to content

Commit

Permalink
Fixed -Wshadow
Browse files Browse the repository at this point in the history
  • Loading branch information
uhlin committed Jan 25, 2025
1 parent 92fe942 commit b562411
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/identd-unix.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* identd-unix.cpp
Copyright (C) 2022 Markus Uhlin. All rights reserved.
Copyright (C) 2022-2025 Markus Uhlin. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -81,13 +81,13 @@ identd::exit_thread(void)
}

void
identd::set_reuseaddr(SOCKET sock)
identd::set_reuseaddr(SOCKET p_sock)
{
int val = 1;

errno = 0;

if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(int)) != 0)
if (setsockopt(p_sock, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(int)) != 0)
err_log(errno, "%s: setsockopt error", __func__);
}

Expand Down
6 changes: 3 additions & 3 deletions src/identd-w32.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* identd-w32.cpp
Copyright (C) 2022 Markus Uhlin. All rights reserved.
Copyright (C) 2022-2025 Markus Uhlin. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -72,11 +72,11 @@ identd::exit_thread(void)
}

void
identd::set_reuseaddr(SOCKET sock)
identd::set_reuseaddr(SOCKET p_sock)
{
BOOL val = TRUE;

if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char *>
if (setsockopt(p_sock, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast<char *>
(&val), sizeof(BOOL)) != 0) {
err_log(0, "%s: setsockopt error (code = %d)", __func__,
WSAGetLastError());
Expand Down

0 comments on commit b562411

Please sign in to comment.