Skip to content

Commit

Permalink
fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
laffer1 committed Sep 18, 2023
1 parent 5b98ca8 commit 4e3fb91
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions mport/mport.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,13 @@ main(int argc, char *argv[])
char** result = mport_setting_list(mport);
char **ptr = result;
if (result != NULL) {
int i = 0;
int c = 0;
while (*result != NULL) {
printf("%s\n", *result);
result++;
i++;
c++;
}
for (int j = 0; j < i; j++)
for (int j = 0; j < c; j++)
free(ptr[j]);
free(ptr);
}
Expand Down Expand Up @@ -512,17 +512,13 @@ lookupIndex(mportInstance *mport, const char *packageName)
int
selectMirror(mportInstance *mport)
{

char *url = NULL;
int mirrorCount = 0;
mportMirrorEntry **mirrorEntry = NULL;
long rrts[32];
char hostname[256];

mport_index_mirror_list(mport, &mirrorEntry);

int fastest = 1000;
char *country = "us";
char *country = (char *) "us";

while(mirrorEntry != NULL && *mirrorEntry != NULL) {
char *p = strchr((*mirrorEntry)->url, '/');
Expand Down

0 comments on commit 4e3fb91

Please sign in to comment.