Skip to content
Snippets Groups Projects
Commit 2db568ef authored by rswindell's avatar rswindell
Browse files

get_distlist() now returns NULL if no local installation files or distributions

found.
parent 4bbe2945
No related branches found
No related tags found
No related merge requests found
...@@ -283,6 +283,11 @@ int main(int argc, char **argv) ...@@ -283,6 +283,11 @@ int main(int argc, char **argv)
distlist=get_distlist(); distlist=get_distlist();
if(distlist==NULL) {
printf("No installation files or distribution list present!\n");
exit(1);
}
if((opt=(char **)MALLOC(sizeof(char *)*(MAX_OPTS+1)))==NULL) if((opt=(char **)MALLOC(sizeof(char *)*(MAX_OPTS+1)))==NULL)
allocfail(sizeof(char *)*(MAX_OPTS+1)); allocfail(sizeof(char *)*(MAX_OPTS+1));
for(i=0;i<(MAX_OPTS+1);i++) for(i=0;i<(MAX_OPTS+1);i++)
...@@ -812,6 +817,8 @@ get_distlist(void) ...@@ -812,6 +817,8 @@ get_distlist(void)
} }
memset(dist[r],0,sizeof(dist_t)); memset(dist[r],0,sizeof(dist_t));
uifc.pop(NULL); uifc.pop(NULL);
if(r<1)
return(NULL);
return(dist); return(dist);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment