diff options
Diffstat (limited to 'dynotify.c')
-rw-r--r-- | dynotify.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -96,11 +96,8 @@ int main (void) // manpage assign 0 to struct, it seems because C11 when cast 0 to void* is same as NULL? see: // https://www.geeksforgeeks.org/null-pointer-in-c/ struct memory chunk = {0}; - char id_str[DYROOM_ID_LEN]; - // or itoa() - sprintf(id_str, "%d", room[i].id); - char url[29+DYROOM_ID_LEN]="https://www.douyu.com/betard/"; - strcat(url,id_str); + char url[29+DYROOM_ID_LEN]; + sprintf(url, "https://www.douyu.com/betard/%d", room[i].id); curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, cb); |