We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b6c079 commit 0bac958Copy full SHA for 0bac958
1 file changed
src/main.c
@@ -41,12 +41,14 @@ int main(void) {
41
goto cleanup_curl;
42
}
43
44
+ /* Obtain the JSON with the thread list */
45
cJSON* root_json = request_json_from_url(curl, THREADS_URL);
46
if (root_json == NULL) {
47
exit_code = EXIT_FAILURE;
48
49
50
51
+ /* Extract the IDs of all available threads */
52
static ThreadId thread_ids[MAX_THREADS] = { 0 };
53
const size_t retreived_ids =
54
thread_ids_from_json(thread_ids, ARRLEN(thread_ids), root_json);
@@ -55,6 +57,7 @@ int main(void) {
55
57
goto cleanup_json;
56
58
59
60
+ /* Request information about each thread, and print its contents */
61
for (size_t i = 0; i < retreived_ids; i++) {
62
const ThreadId cur_thread_id = thread_ids[i];
63
if (cur_thread_id == 0)
0 commit comments