X-Git-Url: https://git.wpitchoune.net/gitweb/?p=ptask.git;a=blobdiff_plain;f=src%2Ftw.c;h=e48ab59f01ce3a43c0b04f75cddf6e593a3082e0;hp=bad97fcf2bd8059ff600da72770e162b5288ea89;hb=017d1fb012447d9b60b71e55fc637bf2422f8d5b;hpb=257549fe9e924e00043e755ae766218e4946aa5b diff --git a/src/tw.c b/src/tw.c index bad97fc..e48ab59 100644 --- a/src/tw.c +++ b/src/tw.c @@ -150,7 +150,7 @@ struct task **tw_get_all_tasks(const char *status) struct json_object *jtasks, *jtask, *json; struct task **tasks; char *opts; - const char *urg; + const char *urg; opts = malloc(strlen("export status:") + strlen(status) + 1); @@ -199,11 +199,11 @@ struct task **tw_get_all_tasks(const char *status) tasks[i]->uuid = strdup(json_object_get_string(json)); json = json_object_object_get(jtask, "urgency"); - urg = json_object_get_string(json); - if (urg) - tasks[i]->urgency = strdup(urg); - else - tasks[i]->urgency = NULL; + urg = json_object_get_string(json); + if (urg) + tasks[i]->urgency = strdup(urg); + else + tasks[i]->urgency = NULL; tasks[i]->note = note_get(tasks[i]->uuid); }