Subversion Repositories SvarDOS

Rev

Rev 2047 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2047 Rev 2048
Line 71... Line 71...
71
  static char path[1024];
71
  static char path[1024];
72
  struct FFDTA *hnd;
72
  struct FFDTA *hnd;
73
  short cflag = 0;  /* used to indicate if findfirst is succesful or not */
73
  short cflag = 0;  /* used to indicate if findfirst is succesful or not */
74
 
74
 
75
  /* verify findData is valid */
75
  /* verify findData is valid */
76
  if (findData == NULL) return INVALID_HANDLE_VALUE;
76
  if (findData == NULL) return(NULL);
77
 
77
 
78
  /* allocate memory for the handle */
78
  /* allocate memory for the handle */
-
 
79
  hnd = malloc(sizeof(*hnd));
79
  if ((hnd = malloc(sizeof(*hnd))) == NULL) return INVALID_HANDLE_VALUE;
80
  if (hnd == NULL) return(NULL);
80
 
81
 
81
  /* initialize structure (clear) */
82
  /* initialize structure (clear) */
82
  /* hnd->handle = 0;  hnd->ffdtaptr = NULL; */
83
  /* hnd->handle = 0;  hnd->ffdtaptr = NULL; */
83
  memset(hnd, 0, sizeof(*hnd));
84
  memset(hnd, 0, sizeof(*hnd));
84
 
85
 
Line 143... Line 144...
143
  }
144
  }
144
  }
145
  }
145
 
146
 
146
  if (cflag) {
147
  if (cflag) {
147
    free(hnd);
148
    free(hnd);
148
    return INVALID_HANDLE_VALUE;
149
    return(NULL);
149
  }
150
  }
150
 
151
 
151
  /* copy its results over */
152
  /* copy its results over */
152
  copyFileData(findData, hnd);
153
  copyFileData(findData, hnd);
153
 
154