aboutsummaryrefslogtreecommitdiffstats
path: root/asn1c/asn1c.c
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2006-03-17 00:20:52 +0000
committerLev Walkin <vlm@lionet.info>2006-03-17 00:20:52 +0000
commit20a7bf48e857fe0e93d5da1a9f494bfdf12bd8df (patch)
tree26df9f48313ad6830dd04ab540a2f7086c844e71 /asn1c/asn1c.c
parente24403db29847f586fddf8c4a467232c7104ec8a (diff)
fixed windows version
Diffstat (limited to 'asn1c/asn1c.c')
-rw-r--r--asn1c/asn1c.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/asn1c/asn1c.c b/asn1c/asn1c.c
index 52b909a..030bdfd 100644
--- a/asn1c/asn1c.c
+++ b/asn1c/asn1c.c
@@ -332,6 +332,7 @@ importStandardModules(asn1p_t *asn, const char *skeletons_dir) {
asn1p_t *new_asn;
asn1p_module_t *mod;
const char *filename;
+ char *fullname;
char *target_dir;
int target_dir_len;
int len;
@@ -365,7 +366,7 @@ importStandardModules(asn1p_t *asn, const char *skeletons_dir) {
assert(pattern);
snprintf(pattern, len, "%s/*.asn1", target_dir);
dir = _findfirst(pattern, &c_file);
- if(dir != -1L) {
+ if(dir == -1L) {
#else
dir = opendir(target_dir);
if(!dir) {
@@ -381,8 +382,8 @@ importStandardModules(asn1p_t *asn, const char *skeletons_dir) {
filename = c_file.name;
#else
while((dp = readdir(dir))) {
- char *fullname;
filename = dp->d_name;
+#endif
len = strlen(filename);
if(len <= 5 || strcmp(filename + len - 5, ".asn1"))
continue;
@@ -391,7 +392,6 @@ importStandardModules(asn1p_t *asn, const char *skeletons_dir) {
if(!fullname) continue; /* Just skip it, no big deal */
snprintf(fullname, len, "%s/%s", target_dir, filename);
filename = fullname;
-#endif
new_asn = asn1p_parse_file(filename, A1P_NOFLAGS);
if(new_asn == NULL) {