[libgtop] openbsd: drop unecessary check
- From: Antoine Jacoutot <ajacoutot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgtop] openbsd: drop unecessary check
- Date: Sat, 8 Feb 2014 10:54:42 +0000 (UTC)
commit 596c42d7f1f21141f4c5e48b2b50d3e74cec8594
Author: Antoine Jacoutot <ajacoutot gnome org>
Date: Sat Feb 8 11:53:26 2014 +0100
openbsd: drop unecessary check
sysdeps/openbsd/procargs.c | 2 +-
sysdeps/openbsd/prockernel.c | 2 +-
sysdeps/openbsd/procmap.c | 2 +-
sysdeps/openbsd/procsignal.c | 2 +-
sysdeps/openbsd/procstate.c | 2 +-
sysdeps/openbsd/proctime.c | 2 +-
sysdeps/openbsd/procuid.c | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/sysdeps/openbsd/procargs.c b/sysdeps/openbsd/procargs.c
index 053317f..069ae80 100644
--- a/sysdeps/openbsd/procargs.c
+++ b/sysdeps/openbsd/procargs.c
@@ -67,7 +67,7 @@ glibtop_get_proc_args_p (glibtop *server, glibtop_proc_args *buf,
/* Get the process data */
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
sizeof (*pinfo), &count);
- if ((pinfo == NULL) || (count < 1)) {
+ if (pinfo == NULL) {
glibtop_suid_leave (server);
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
return NULL;
diff --git a/sysdeps/openbsd/prockernel.c b/sysdeps/openbsd/prockernel.c
index 698c5c5..0e679ba 100644
--- a/sysdeps/openbsd/prockernel.c
+++ b/sysdeps/openbsd/prockernel.c
@@ -74,7 +74,7 @@ glibtop_get_proc_kernel_p (glibtop *server,
/* Get the process information */
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
sizeof(*pinfo), &count);
- if ((pinfo == NULL) || (count != 1)) {
+ if (pinfo == NULL) {
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
glibtop_suid_leave (server);
return;
diff --git a/sysdeps/openbsd/procmap.c b/sysdeps/openbsd/procmap.c
index 9a01d2e..28a8922 100644
--- a/sysdeps/openbsd/procmap.c
+++ b/sysdeps/openbsd/procmap.c
@@ -182,7 +182,7 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
/* Get the process data */
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, sizeof(struct kinfo_proc), &count);
- if ((pinfo == NULL) || (count < 1)) {
+ if (pinfo == NULL) {
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
return (glibtop_map_entry*) g_array_free(maps, TRUE);
}
diff --git a/sysdeps/openbsd/procsignal.c b/sysdeps/openbsd/procsignal.c
index ca228bd..3a40f1b 100644
--- a/sysdeps/openbsd/procsignal.c
+++ b/sysdeps/openbsd/procsignal.c
@@ -60,7 +60,7 @@ glibtop_get_proc_signal_p (glibtop *server,
/* Get the process information */
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
sizeof (*pinfo), &count);
- if ((pinfo == NULL) || (count != 1)) {
+ if (pinfo == NULL) {
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
return;
}
diff --git a/sysdeps/openbsd/procstate.c b/sysdeps/openbsd/procstate.c
index 7f05646..95210a7 100644
--- a/sysdeps/openbsd/procstate.c
+++ b/sysdeps/openbsd/procstate.c
@@ -62,7 +62,7 @@ glibtop_get_proc_state_p (glibtop *server,
/* Get the process information */
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
sizeof (*pinfo), &count);
- if ((pinfo == NULL) || (count != 1)) {
+ if (pinfo == NULL) {
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
return;
}
diff --git a/sysdeps/openbsd/proctime.c b/sysdeps/openbsd/proctime.c
index af8551d..f10b02a 100644
--- a/sysdeps/openbsd/proctime.c
+++ b/sysdeps/openbsd/proctime.c
@@ -76,7 +76,7 @@ glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
/* Get the process information */
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
sizeof (*pinfo), &count);
- if ((pinfo == NULL) || (count != 1)) {
+ if (pinfo == NULL) {
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
return;
}
diff --git a/sysdeps/openbsd/procuid.c b/sysdeps/openbsd/procuid.c
index 754fff1..9632ca1 100644
--- a/sysdeps/openbsd/procuid.c
+++ b/sysdeps/openbsd/procuid.c
@@ -65,7 +65,7 @@ glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf,
/* Get the process information */
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid,
sizeof (*pinfo), &count);
- if ((pinfo == NULL) || (count != 1)) {
+ if (pinfo == NULL) {
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]