Age | Commit message (Collapse) | Author |
|
Closes: #468
|
|
If the process has already less capabilities than we are trying to keep,
do not try to set them.
|
|
Allows to set attributes when padding process fields in non-wide ncurses
mode.
Closes: #475
|
|
strcasestr(3) is a GNU extension and when compiling freebsd/Platform.c
on kfreebsd for Debian <string.h> is included before we define
_GNU_SOURCE, so the function is not available.
In file included from ./Object.h:16,
from ./ListItem.h:12,
from ./Meter.h:16,
from ./Header.h:10,
from ./Action.h:15,
from freebsd/Platform.h:13,
from freebsd/Platform.c:8:
./XUtils.h: In function ‘String_contains_i’:
./XUtils.h:43:11: warning: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Wimplicit-function-declaration]
43 | return strcasestr(s1, s2) != NULL;
| ^~~~~~~~~~
| strcasecmp
./XUtils.h:43:30: warning: comparison between pointer and integer
43 | return strcasestr(s1, s2) != NULL;
| ^~
In file included from ./Object.h:16,
from ./ProcessList.h:16,
from freebsd/FreeBSDProcessList.h:15,
from freebsd/FreeBSDProcessList.c:8:
./XUtils.h: In function ‘String_contains_i’:
./XUtils.h:43:11: warning: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Wimplicit-function-declaration]
43 | return strcasestr(s1, s2) != NULL;
| ^~~~~~~~~~
| strcasecmp
./XUtils.h:43:30: warning: comparison between pointer and integer
43 | return strcasestr(s1, s2) != NULL;
| ^~
|
|
strcasestr(3) is a GNU extension and when compiling freebsd/Platform.c
on kfreebsd for Debian <string.h> is included before we define
_GNU_SOURCE, so the function is not available.
In file included from ./Object.h:16,
from ./ListItem.h:12,
from ./Meter.h:16,
from ./Header.h:10,
from ./Action.h:15,
from freebsd/Platform.h:13,
from freebsd/Platform.c:8:
./XUtils.h: In function ‘String_contains_i’:
./XUtils.h:43:11: warning: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Wimplicit-function-declaration]
43 | return strcasestr(s1, s2) != NULL;
| ^~~~~~~~~~
| strcasecmp
./XUtils.h:43:30: warning: comparison between pointer and integer
43 | return strcasestr(s1, s2) != NULL;
| ^~
In file included from ./Object.h:16,
from ./ProcessList.h:16,
from freebsd/FreeBSDProcessList.h:15,
from freebsd/FreeBSDProcessList.c:8:
./XUtils.h: In function ‘String_contains_i’:
./XUtils.h:43:11: warning: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Wimplicit-function-declaration]
43 | return strcasestr(s1, s2) != NULL;
| ^~~~~~~~~~
| strcasecmp
./XUtils.h:43:30: warning: comparison between pointer and integer
43 | return strcasestr(s1, s2) != NULL;
| ^~
|
|
The return value is guaranteed to be smaller than SIZE_MAX, so return
size_t (matters on 32 bit architectures).
|
|
|
|
Avoid <linux/magic.h> include, not found by musl-gcc.
The value of SELINUX_MAGIC should really never change.
|
|
|
|
According to the Linux kernel documentation, "SwapCached" tracks "memory
that once was swapped out, is swapped back in but still also is
in the swapfile (if memory is needed it doesn't need to be swapped out
AGAIN because it is already in the swapfile. This saves I/O)."
|
|
Conflicts with setuid support, but that is commonly not enabled.
|
|
|
|
|
|
It is only used on Linux to optimize memory handling in case the command
changes to a smaller-or-equal string.
This "optimization" however causes more code bloat and maintenance cost
on string handling issues than it gains.
|
|
Reduces code in callers and helps avoiding memory leaks.
|
|
|
|
The standard strncpy fails to null-terminate the destination in case
the source is longer than the passed size.
|
|
The previous if conditional branch would have been taken
in case this condition would be true,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This affects:
- PROC_COMM, PROC_EXE and CWD on Linux
- JAIL on FreeBSD and DragonFlyBSD
- ZONE on Solaris
|
|
|
|
|
|
Fixes: #459
|
|
|
|
Fixes prototype of SolarisProcess_compareByKey since 90ea3ac3
|
|
They are not used in any other function and are not used maybe
uninitialized.
|
|
|
|
|
|
|
|
|
|
|
|
CRT.c:821:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
#ifdef HAVE_EXECINFO_H
^
CRT.c:823:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
#endif
^
CRT.c:858:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
#ifdef HTOP_DARWIN
^
CRT.c:862:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
#endif
^
CRT.c:864:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
#ifdef HTOP_DARWIN
^
CRT.c:868:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
#endif
^
|
|
Avoid format string issues like bfcb8ca0 by helping compilers spot such
bogus usages.
Also use LTO and O3 in the full-featured gcc job, which might trigger
additional warnings on advanced inlining, like
3695cbd5d8dda27f99383437035450814463b633 and
ad3acfc847e9d54f07a0684c19181d5f4c28fee4
|
|
Partially revert 4b14ab9789eee004daab8594ac00a113c18af060
ColorPair(Black,Black) is not actually black on black, but due to
adjustments in CRT_setColors() black on default-background-color.
Thanks to V for reporting.
|
|
mvwprintw takes a format string as its fourth argument, and title is
user-controlled. This results in e.g. crashing when trying to trace a
process with a format specifier in its command line.
|
|
They do not clean up the ncurses environment, leaving the terminal in a
broken state.
Also drop bare usage of exit(3).
|
|
|
|
Vector_get() currently takes a `const Vector*` in debug mode and a
`Vector*` else.
|
|
|
|
|
|
|
|
|