summaryrefslogtreecommitdiff
path: root/psutil
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2020-02-18 18:44:43 +0100
committerGitHub <noreply@github.com>2020-02-18 18:44:43 +0100
commit5e47e0bcba7585909a11e9c7424e864fc26a7fd2 (patch)
treefd808e05f549866b81fbaed527c0226355c02af3 /psutil
parent41fcba5dd7ecbbc788814c722f31e630422ba28e (diff)
downloadpsutil-5e47e0bcba7585909a11e9c7424e864fc26a7fd2.tar.gz
Add C linter script (#1698)
Diffstat (limited to 'psutil')
-rw-r--r--psutil/_psutil_aix.c2
-rw-r--r--psutil/_psutil_posix.c4
-rw-r--r--psutil/_psutil_sunos.c2
-rw-r--r--psutil/arch/aix/common.c2
-rw-r--r--psutil/arch/aix/ifaddrs.c2
-rw-r--r--psutil/arch/aix/ifaddrs.h3
-rw-r--r--psutil/arch/aix/net_connections.h2
-rw-r--r--psutil/arch/aix/net_kernel_structs.h2
-rw-r--r--psutil/arch/freebsd/specific.c2
-rw-r--r--psutil/arch/solaris/environ.c4
-rw-r--r--psutil/arch/windows/net.c2
11 files changed, 13 insertions, 14 deletions
diff --git a/psutil/_psutil_aix.c b/psutil/_psutil_aix.c
index b8584f26..cf79d307 100644
--- a/psutil/_psutil_aix.c
+++ b/psutil/_psutil_aix.c
@@ -15,7 +15,7 @@
* - psutil.Process.io_counters read count is always 0
* - psutil.Process.io_counters may not be available on older AIX versions
* - psutil.Process.threads may not be available on older AIX versions
- # - psutil.net_io_counters may not be available on older AIX versions
+ * - psutil.net_io_counters may not be available on older AIX versions
* - reading basic process info may fail or return incorrect values when
* process is starting (see IBM APAR IV58499 - fixed in newer AIX versions)
* - sockets and pipes may not be counted in num_fds (fixed in newer AIX
diff --git a/psutil/_psutil_posix.c b/psutil/_psutil_posix.c
index fa554be9..38483b3b 100644
--- a/psutil/_psutil_posix.c
+++ b/psutil/_psutil_posix.c
@@ -192,8 +192,8 @@ psutil_convert_ipaddr(struct sockaddr *addr, int family) {
// XXX we get here on FreeBSD when processing 'lo' / AF_INET6
// broadcast. Not sure what to do other than returning None.
// ifconfig does not show anything BTW.
- //PyErr_Format(PyExc_RuntimeError, gai_strerror(err));
- //return NULL;
+ // PyErr_Format(PyExc_RuntimeError, gai_strerror(err));
+ // return NULL;
Py_INCREF(Py_None);
return Py_None;
}
diff --git a/psutil/_psutil_sunos.c b/psutil/_psutil_sunos.c
index 8aa7eadd..6548640b 100644
--- a/psutil/_psutil_sunos.c
+++ b/psutil/_psutil_sunos.c
@@ -496,7 +496,7 @@ proc_io_counters(PyObject* self, PyObject* args) {
info.pr_inblk,
info.pr_oublk);
}
- */
+*/
/*
diff --git a/psutil/arch/aix/common.c b/psutil/arch/aix/common.c
index 6115a15d..945cbd97 100644
--- a/psutil/arch/aix/common.c
+++ b/psutil/arch/aix/common.c
@@ -76,4 +76,4 @@ psutil_read_process_table(int * num) {
*num = np;
return processes;
-} \ No newline at end of file
+}
diff --git a/psutil/arch/aix/ifaddrs.c b/psutil/arch/aix/ifaddrs.c
index 1a819365..1480b60f 100644
--- a/psutil/arch/aix/ifaddrs.c
+++ b/psutil/arch/aix/ifaddrs.c
@@ -146,4 +146,4 @@ error:
close(sd);
freeifaddrs(*ifap);
return (-1);
-} \ No newline at end of file
+}
diff --git a/psutil/arch/aix/ifaddrs.h b/psutil/arch/aix/ifaddrs.h
index 3920c1cc..e15802bf 100644
--- a/psutil/arch/aix/ifaddrs.h
+++ b/psutil/arch/aix/ifaddrs.h
@@ -31,5 +31,4 @@ struct ifaddrs {
extern int getifaddrs(struct ifaddrs **);
extern void freeifaddrs(struct ifaddrs *);
-
-#endif \ No newline at end of file
+#endif
diff --git a/psutil/arch/aix/net_connections.h b/psutil/arch/aix/net_connections.h
index 222bcaf3..d57ee428 100644
--- a/psutil/arch/aix/net_connections.h
+++ b/psutil/arch/aix/net_connections.h
@@ -12,4 +12,4 @@
PyObject* psutil_net_connections(PyObject *self, PyObject *args);
-#endif /* __NET_CONNECTIONS_H__ */ \ No newline at end of file
+#endif /* __NET_CONNECTIONS_H__ */
diff --git a/psutil/arch/aix/net_kernel_structs.h b/psutil/arch/aix/net_kernel_structs.h
index 4e7a088c..7e22a163 100644
--- a/psutil/arch/aix/net_kernel_structs.h
+++ b/psutil/arch/aix/net_kernel_structs.h
@@ -108,4 +108,4 @@ struct mbuf64
#define m_len m_hdr.mh_len
-#endif /* __64BIT__ */ \ No newline at end of file
+#endif /* __64BIT__ */
diff --git a/psutil/arch/freebsd/specific.c b/psutil/arch/freebsd/specific.c
index 3d54b47e..3f37a08e 100644
--- a/psutil/arch/freebsd/specific.c
+++ b/psutil/arch/freebsd/specific.c
@@ -729,7 +729,7 @@ error:
PyObject *
psutil_proc_memory_maps(PyObject *self, PyObject *args) {
// Return a list of tuples for every process memory maps.
- //'procstat' cmdline utility has been used as an example.
+ // 'procstat' cmdline utility has been used as an example.
pid_t pid;
int ptrwidth;
int i, cnt;
diff --git a/psutil/arch/solaris/environ.c b/psutil/arch/solaris/environ.c
index eb0fa2ab..482fe1fc 100644
--- a/psutil/arch/solaris/environ.c
+++ b/psutil/arch/solaris/environ.c
@@ -11,8 +11,8 @@
#include <Python.h>
#if !defined(_LP64) && _FILE_OFFSET_BITS == 64
-# undef _FILE_OFFSET_BITS
-# undef _LARGEFILE64_SOURCE
+ #undef _FILE_OFFSET_BITS
+ #undef _LARGEFILE64_SOURCE
#endif
#include <sys/types.h>
diff --git a/psutil/arch/windows/net.c b/psutil/arch/windows/net.c
index f0572d52..56c6b6f1 100644
--- a/psutil/arch/windows/net.c
+++ b/psutil/arch/windows/net.c
@@ -401,7 +401,7 @@ psutil_net_if_stats(PyObject *self, PyObject *args) {
}
// is up?
- if((pIfRow->dwOperStatus == MIB_IF_OPER_STATUS_CONNECTED ||
+ if ((pIfRow->dwOperStatus == MIB_IF_OPER_STATUS_CONNECTED ||
pIfRow->dwOperStatus == MIB_IF_OPER_STATUS_OPERATIONAL) &&
pIfRow->dwAdminStatus == 1 ) {
py_is_up = Py_True;