Skip to content

Commit 2f0d1cc

Browse files
committed
Make some variables local to a block.
1 parent 5221dc2 commit 2f0d1cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

readdir/readdir.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ int
1313
main(int argc, char *argv[])
1414
{
1515
int i;
16-
DIR *d;
17-
struct dirent *de;
1816

1917
if (argc == 1)
2018
errx(1, "usage: %s dir1 [dir2 [dir3 ...]]", argv[0]);
2119

2220
for (i = 1; i < argc; i++) {
21+
DIR *d;
22+
struct dirent *de;
23+
2324
printf("== [%s] ==\n", argv[i]);
2425
if ((d = opendir(argv[i])) == NULL) {
2526
warn("%s", argv[i]);

0 commit comments

Comments
 (0)