diff options
author | stderr64 <stderr64@null.net> | 2024-05-15 22:09:40 +0300 |
---|---|---|
committer | stderr64 <stderr64@null.net> | 2024-05-15 22:09:40 +0300 |
commit | bcb07c7207b1194cf032ed8f0f841b3c3e57367b (patch) | |
tree | 5b06fa8a28af0311e32a9f5fd98eafeaebf8e0b1 /load_webhooks.h | |
parent | 2d22f149180ba28186cf142ec30dc91c841d0328 (diff) | |
download | CWebHook-bcb07c7207b1194cf032ed8f0f841b3c3e57367b.tar.gz CWebHook-bcb07c7207b1194cf032ed8f0f841b3c3e57367b.tar.zst |
Because long long int is bad idea, using int64_t and ssize_t it can at least be expected that the max and minimum values are for each
Diffstat (limited to 'load_webhooks.h')
-rw-r--r-- | load_webhooks.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/load_webhooks.h b/load_webhooks.h index 5c3a60b..816e9ba 100644 --- a/load_webhooks.h +++ b/load_webhooks.h @@ -25,7 +25,7 @@ int load_webhooks( char *wh_file_name, webhooks_data_t *wdt ){ fclose( whconf ); return WH_LOAD_FAILED; } - long long int wh_file_size = (long long int)ftell( whconf ); + int64_t wh_file_size = (int64_t)ftell( whconf ); if ( wh_file_size <= 0 ){ wh_file_size = 0; fclose( whconf ); @@ -38,7 +38,7 @@ int load_webhooks( char *wh_file_name, webhooks_data_t *wdt ){ fclose( whconf ); return WH_LOAD_FAILED; } - if ( (long long int)fread(wdt->webhooks_config, sizeof(char), (size_t)(wh_file_size * sizeof(char)), whconf) == (long long int)-1 ){ + if ( (int64_t)fread(wdt->webhooks_config, sizeof(char), (size_t)(wh_file_size * sizeof(char)), whconf) == (int64_t)-1 ){ wh_file_size = 0; free( wdt->webhooks_config ); fclose( whconf ); |