[libgtop/benoit/gnome-2-36] Add NULL pointer checker (bug found with scan-build).
- From: Benoît Dejean <bdejean src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgtop/benoit/gnome-2-36] Add NULL pointer checker (bug found with scan-build).
- Date: Mon, 1 May 2017 04:55:13 +0000 (UTC)
commit e0f97e7dbd6ec87103705d3e114876d44cb0ca4c
Author: Benoît Dejean <bdejean gmail com>
Date: Mon May 1 06:31:54 2017 +0200
Add NULL pointer checker (bug found with scan-build).
sysdeps/common/error.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/sysdeps/common/error.c b/sysdeps/common/error.c
index 0502271..6ca947b 100644
--- a/sysdeps/common/error.c
+++ b/sysdeps/common/error.c
@@ -46,7 +46,7 @@ print_message (const glibtop *server, int message_level, const char *format, int
g_string_printf(message, "%s", (server && server->name ? server->name : DEFAULT_NAME));
- if (server->pid) {
+ if (server && server->pid) {
g_string_append_printf(message, "(c=%u/s=%u)", getpid(), server->pid);
}
else {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]