Skip to content

Commit

Permalink
define static/private functions
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Dec 20, 2023
1 parent 1896a4a commit 1a03a5a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions psutil/arch/freebsd/sys_socks.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static struct xfile *psutil_xfiles;
static int psutil_nxfiles;


int
static int
psutil_populate_xfiles(void) {
size_t len;

Expand Down Expand Up @@ -61,7 +61,7 @@ psutil_populate_xfiles(void) {
}


struct xfile *
static struct xfile *
psutil_get_file_from_sock(kvaddr_t sock) {
struct xfile *xf;
int n;
Expand All @@ -76,7 +76,8 @@ psutil_get_file_from_sock(kvaddr_t sock) {

// Reference:
// https://github.com/freebsd/freebsd/blob/master/usr.bin/sockstat/sockstat.c
int psutil_gather_inet(
static int
psutil_gather_inet(
int proto, int include_v4, int include_v6, PyObject *py_retlist)
{
struct xinpgen *xig, *exig;
Expand Down Expand Up @@ -243,7 +244,8 @@ int psutil_gather_inet(
}


int psutil_gather_unix(int proto, PyObject *py_retlist) {
static int
psutil_gather_unix(int proto, PyObject *py_retlist) {
struct xunpgen *xug, *exug;
struct xunpcb *xup;
const char *varname = NULL;
Expand Down Expand Up @@ -347,7 +349,7 @@ int psutil_gather_unix(int proto, PyObject *py_retlist) {
}


int
static int
psutil_int_in_seq(int value, PyObject *py_seq) {
int inseq;
PyObject *py_value;
Expand Down

0 comments on commit 1a03a5a

Please sign in to comment.