- if (S_ISDIR(data.st_mode)) shmptr->tot_dir;
- if (S_ISBLK(data.st_mode)) shmptr->tot_block;
- if (S_ISCHR(data.st_mode)) shmptr->tot_char;
- if (S_ISSOCK(data.st_mode)) shmptr->tot_sock;
+ if (S_ISDIR(data.st_mode)) shmptr->tot_dir++;
+ if (S_ISBLK(data.st_mode)) shmptr->tot_block++;
+ if (S_ISCHR(data.st_mode)) shmptr->tot_char++;
+ if (S_ISSOCK(data.st_mode)) shmptr->tot_sock++;