removed non-so-stupid gotos from core-misc
in the name of Satan, please do not cause any problems
This commit is contained in:
parent
b6bace31e2
commit
2408e0cef5
@ -203,10 +203,8 @@ enum WHY2_EXIT_CODES why2_check_version(void) //! CRASHES WHEN CALLED FROM CHAT
|
||||
why2_clean_memory("core_version_check");
|
||||
return WHY2_WHY2_UPDATE_FAILED;
|
||||
}
|
||||
|
||||
goto deallocation; //GREAT SUCCESS!
|
||||
}
|
||||
|
||||
} else
|
||||
{
|
||||
//COUNT WHY2_VERSIONS BEHIND
|
||||
int versionsIndex = -1;
|
||||
int versionsBuffer = 0;
|
||||
@ -230,10 +228,8 @@ enum WHY2_EXIT_CODES why2_check_version(void) //! CRASHES WHEN CALLED FROM CHAT
|
||||
if (versionsIndex == -1)
|
||||
{
|
||||
if (!why2_get_flags().no_output) printf("Version %s not found! Check your flags.\n\n", WHY2_VERSION);
|
||||
|
||||
goto deallocation;
|
||||
}
|
||||
|
||||
} else
|
||||
{
|
||||
//COUNT versionsBuffer
|
||||
versionsBuffer = json_object_array_length(deprecated) - versionsIndex;
|
||||
|
||||
@ -242,8 +238,8 @@ enum WHY2_EXIT_CODES why2_check_version(void) //! CRASHES WHEN CALLED FROM CHAT
|
||||
//WAIT FOR 5 SECONDS
|
||||
sleep(5);
|
||||
}
|
||||
|
||||
deallocation:
|
||||
}
|
||||
}
|
||||
|
||||
//DEALLOCATION
|
||||
json_object_put(parsedJson); //THIS FREES EVERY json_object - AT LEAST JSON-C'S DOCUMENTATION SAYS THAT
|
||||
|
Loading…
x
Reference in New Issue
Block a user