Xinqi Bao's Git
projects
/
slstatus.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Fix CPU frequency on OpenBSD
[slstatus.git]
/
components
/
num_files.c
diff --git
a/components/num_files.c
b/components/num_files.c
index
9179037
..
fb55df9
100644
(file)
--- a/
components/num_files.c
+++ b/
components/num_files.c
@@
-1,20
+1,19
@@
/* See LICENSE file for copyright and license details. */
#include <dirent.h>
/* See LICENSE file for copyright and license details. */
#include <dirent.h>
-#include <errno.h>
#include <stdio.h>
#include <string.h>
#include "../util.h"
const char *
#include <stdio.h>
#include <string.h>
#include "../util.h"
const char *
-num_files(const char *
dir
)
+num_files(const char *
path
)
{
struct dirent *dp;
DIR *fd;
int num;
{
struct dirent *dp;
DIR *fd;
int num;
- if (!(fd = opendir(
dir
))) {
- warn("opendir '%s':",
dir
);
+ if (!(fd = opendir(
path
))) {
+ warn("opendir '%s':",
path
);
return NULL;
}
return NULL;
}