Browse Source

fixed order of includes; added _GNU_SOURCE define to succ. compile under Linux; through away return value of closedir()

master
T. Meissner 10 years ago
parent
commit
5d15239439
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      21st_century_c/process_dir.c

+ 6
- 3
21st_century_c/process_dir.c View File

@ -1,8 +1,11 @@
#include "process_dir.h"
#include <dirent.h>
#define _GNU_SOURCE
#include <stdio.h>
#include <dirent.h>
#include <stdlib.h>
#include "process_dir.h"
int process_dir_r(filestruct level) {
if (!level.fullname) {
@ -48,6 +51,6 @@ int process_dir_r(filestruct level) {
free(next_level.fullname);
}
}
closedir(current);
(void) closedir(current);
return errct;
}

Loading…
Cancel
Save