From 9aafd0f2388699b4342e6821e608b60145c91c85 Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Tue, 28 Nov 2023 22:13:58 +0300 Subject: [PATCH] formatting --- src/yadisk_api_internal.c | 2 +- src/yadisk_get_disk.c | 5 +++-- src/yadisk_get_disk.h | 5 ++--- src/yadisk_get_disk_resources.c | 7 ++++--- src/yadisk_shared.h | 3 +-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/yadisk_api_internal.c b/src/yadisk_api_internal.c index 1574f77..e598e0a 100644 --- a/src/yadisk_api_internal.c +++ b/src/yadisk_api_internal.c @@ -93,4 +93,4 @@ int api_http_request( curl_global_cleanup(); return 0; -} \ No newline at end of file +} diff --git a/src/yadisk_get_disk.c b/src/yadisk_get_disk.c index 0999587..fcd8dab 100644 --- a/src/yadisk_get_disk.c +++ b/src/yadisk_get_disk.c @@ -5,7 +5,8 @@ #include "yadisk_get_disk.h" #include "yadisk_api_internal.h" -yadisk_code yadisk_get_disk(yadisk_api_client *client, yadisk_disk_info* info) { +yadisk_code yadisk_get_disk(yadisk_api_client* client, yadisk_disk_info* info) +{ char* output = NULL; int error = api_http_request(client, "GET", "/v1/disk", NULL, 0, &output); json_object* root = json_tokener_parse(output); @@ -25,4 +26,4 @@ yadisk_code yadisk_get_disk(yadisk_api_client *client, yadisk_disk_info* info) { json_object_put(root); free(output); return YADISK_OK; -} \ No newline at end of file +} diff --git a/src/yadisk_get_disk.h b/src/yadisk_get_disk.h index 276149e..350e1a8 100644 --- a/src/yadisk_get_disk.h +++ b/src/yadisk_get_disk.h @@ -7,11 +7,10 @@ #include "yadisk_shared.h" -typedef struct yadisk_disk_info -{ +typedef struct yadisk_disk_info { unsigned long total_space; } yadisk_disk_info; -yadisk_code yadisk_get_disk(yadisk_api_client *client, yadisk_disk_info* info); +yadisk_code yadisk_get_disk(yadisk_api_client* client, yadisk_disk_info* info); #endif //YADISK_YADISK_GET_DISK_H diff --git a/src/yadisk_get_disk_resources.c b/src/yadisk_get_disk_resources.c index 3077f71..e0619b4 100644 --- a/src/yadisk_get_disk_resources.c +++ b/src/yadisk_get_disk_resources.c @@ -5,7 +5,8 @@ #include "yadisk_api_internal.h" yadisk_code -yadisk_get_disk_resources(yadisk_api_client *client, const char *path) { - char *output; +yadisk_get_disk_resources(yadisk_api_client* client, const char* path) +{ + char* output; int error = api_http_request(client, "GET", "/v1/disk", NULL, 0, &output); -}; \ No newline at end of file +}; diff --git a/src/yadisk_shared.h b/src/yadisk_shared.h index c06ed41..d0f0486 100644 --- a/src/yadisk_shared.h +++ b/src/yadisk_shared.h @@ -14,8 +14,7 @@ typedef enum { YADISK_FAILED_PARSE_JSON = 1 } yadisk_code; -typedef struct -{ +typedef struct { char* token; } yadisk_api_client;