Rev 3552 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3552 | Rev 3553 | ||
---|---|---|---|
Line 171... | Line 171... | ||
171 | } |
171 | } |
172 | 172 | ||
173 | /* Create an array of pointers to direct dependencies */ |
173 | /* Create an array of pointers to direct dependencies */ |
174 | 174 | ||
175 | m->n_deps = n; |
175 | m->n_deps = n; |
- | 176 | ||
176 | if (n > 0) |
177 | if (n == 0) { |
177 | m->deps = malloc(n * sizeof(module_t *)); |
178 | /* There are no dependencies, so we are done. */ |
178 | else |
- | |
179 | m->deps = NULL; |
179 | m->deps = NULL; |
- | 180 | return; |
|
- | 181 | } |
|
180 | 182 | ||
- | 183 | m->deps = malloc(n * sizeof(module_t *)); |
|
181 | if (!m->deps) { |
184 | if (!m->deps) { |
182 | printf("malloc failed\n"); |
185 | printf("malloc failed\n"); |
183 | exit(1); |
186 | exit(1); |
184 | } |
187 | } |
185 | 188 |