Skip to content

Commit 143c3dc

Browse files
committed
Address review feedback on portability fixes
1 parent 846bd4d commit 143c3dc

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/OVAL/probes/unix/password_probe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ static struct passwd *oscap_fgetpwent(FILE *fp)
110110
continue;
111111
}
112112

113-
if (line[0] == '#' || line[0] == '\n')
113+
if (line[0] == '#')
114114
continue;
115115
f = 0;
116116
p = line;

src/common/memusage.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,8 @@ int oscap_proc_memusage(struct proc_memusage *mu)
370370
errno = EOPNOTSUPP;
371371
return -1;
372372
}
373-
mu->mu_rss = info.resident_size / 1024;
374-
mu->mu_data = info.virtual_size / 1024;
373+
mu->mu_rss = BYTES_TO_KIB(info.resident_size);
374+
mu->mu_data = BYTES_TO_KIB(info.virtual_size);
375375
/* TASK_BASIC_INFO doesn't expose peak RSS; use current as approximation */
376376
mu->mu_hwm = mu->mu_rss;
377377
mu->mu_text = 0;

0 commit comments

Comments
 (0)