summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/cal.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/mbbsd/cal.c b/mbbsd/cal.c
index 736f41fe..a180a182 100644
--- a/mbbsd/cal.c
+++ b/mbbsd/cal.c
@@ -463,17 +463,15 @@ p_sysinfo(void)
struct rusage ru;
#ifdef __linux__
int vmdata=0, vmstk=0;
- {
- FILE * fp;
- char buf[128];
- if ((fp = fopen("/proc/self/status", "r"))) {
- while (fgets(buf, 128, fp) && vmdata==0 && vmstk==0) {
- sscanf(buf, "VmData: %d", &vmdata);
- sscanf(buf, "VmStk: %d", &vmstk);
- }
- fclose(fp);
+ FILE * fp;
+ char buf[128];
+ if ((fp = fopen("/proc/self/status", "r"))) {
+ while (fgets(buf, 128, fp)) {
+ sscanf(buf, "VmData: %d", &vmdata);
+ sscanf(buf, "VmStk: %d", &vmstk);
}
- }
+ fclose(fp);
+ }
#endif
getrusage(RUSAGE_SELF, &ru);
prints("°O¾ÐÅé¥Î¶q: "