mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Some more locations for ARRAYSIZE
This commit is contained in:
@ -10,6 +10,7 @@ in the source distribution for its full text.
|
||||
#include "ProcessList.h"
|
||||
#include "OpenBSDProcessList.h"
|
||||
#include "OpenBSDProcess.h"
|
||||
#include "Macros.h"
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
@ -118,7 +119,7 @@ static inline void OpenBSDProcessList_scanMemoryInfo(ProcessList* pl) {
|
||||
pl->cachedMem *= PAGE_SIZE_KB;
|
||||
|
||||
struct kvm_swap swap[16];
|
||||
int nswap = kvm_getswapinfo(opl->kd, swap, sizeof(swap)/sizeof(swap[0]), 0);
|
||||
int nswap = kvm_getswapinfo(opl->kd, swap, ARRAYSIZE(swap), 0);
|
||||
pl->totalSwap = 0;
|
||||
pl->usedSwap = 0;
|
||||
for (int i = 0; i < nswap; i++) {
|
||||
|
@ -7,6 +7,7 @@ in the source distribution for its full text.
|
||||
*/
|
||||
|
||||
#include "Platform.h"
|
||||
#include "Macros.h"
|
||||
#include "Meter.h"
|
||||
#include "CPUMeter.h"
|
||||
#include "MemoryMeter.h"
|
||||
@ -84,7 +85,7 @@ const SignalItem Platform_signals[] = {
|
||||
{ .name = "32 SIGTHR", .number = 32 },
|
||||
};
|
||||
|
||||
const unsigned int Platform_numberOfSignals = sizeof(Platform_signals)/sizeof(SignalItem);
|
||||
const unsigned int Platform_numberOfSignals = ARRAYSIZE(Platform_signals);
|
||||
|
||||
void Platform_setBindings(Htop_Action* keys) {
|
||||
(void) keys;
|
||||
|
Reference in New Issue
Block a user