diff options
author | Graham Inggs <ginggs@debian.org> | 2018-02-05 14:48:51 +0200 |
---|---|---|
committer | Graham Inggs <ginggs@debian.org> | 2018-02-05 14:48:51 +0200 |
commit | 2ee50d030178cede83eb9d0005fbc19f819d30fe (patch) | |
tree | 67d75c0a7c47e15bed9d0735ecf12abec4f8157b /linux/Platform.c | |
parent | 31b71b67011fa52f091df6fe536a11d6d0bfb256 (diff) | |
download | debian_htop-2ee50d030178cede83eb9d0005fbc19f819d30fe.tar.gz debian_htop-2ee50d030178cede83eb9d0005fbc19f819d30fe.tar.bz2 debian_htop-2ee50d030178cede83eb9d0005fbc19f819d30fe.zip |
Imported Upstream version 2.1.0upstream/2.1.0
Diffstat (limited to 'linux/Platform.c')
-rw-r--r-- | linux/Platform.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/linux/Platform.c b/linux/Platform.c index 04360ca..025abff 100644 --- a/linux/Platform.c +++ b/linux/Platform.c @@ -47,7 +47,7 @@ ProcessField Platform_defaultFields[] = { PID, USER, PRIORITY, NICE, M_SIZE, M_R int Platform_numberOfFields = LAST_PROCESSFIELD; -SignalItem Platform_signals[] = { +const SignalItem Platform_signals[] = { { .name = " 0 Cancel", .number = 0 }, { .name = " 1 SIGHUP", .number = 1 }, { .name = " 2 SIGINT", .number = 2 }, @@ -84,7 +84,7 @@ SignalItem Platform_signals[] = { { .name = "31 SIGSYS", .number = 31 }, }; -unsigned int Platform_numberOfSignals = sizeof(Platform_signals)/sizeof(SignalItem); +const unsigned int Platform_numberOfSignals = sizeof(Platform_signals)/sizeof(SignalItem); static Htop_Reaction Platform_actionSetIOPriority(State* st) { Panel* panel = st->panel; @@ -215,7 +215,7 @@ void Platform_setSwapValues(Meter* this) { char* Platform_getProcessEnv(pid_t pid) { char procname[32+1]; - snprintf(procname, 32, "/proc/%d/environ", pid); + xSnprintf(procname, 32, "/proc/%d/environ", pid); FILE* fd = fopen(procname, "r"); char *env = NULL; if (fd) { |