commit - 854327fe7565ed4ee89ca68b063386fe18154156
commit + 8cdc561067c1b5594ef8a74c94633a92eef8c6ac
blob - af14c19396c6d30efe0cac3397210edd3895afbd
blob + 29e8d78d809d4d7f8086e73b4122d3a910a28957
--- FICS/playerdb.c
+++ FICS/playerdb.c
Markus Uhlin 25/04/06 Fixed Clang Tidy warnings.
Markus Uhlin 25/07/28 Restricted file permissions upon
creation.
+ Markus Uhlin 25/07/30 Usage of 'int64_t'.
*/
#include "stdinclude.h"
char loginName[MAX_LOGIN_NAME];
int inout, registered;
int ret, too_long;
- long int lval = 0;
+ int64_t lval = 0;
time_t last = 0;
ret = snprintf(fname, sizeof fname, "%s/player_data/%c/%s.%s",
_Static_assert(19 < ARRAY_SIZE(ipstr),
"'ipstr' too small");
- if (fscanf(fp, "%d %19s %ld %d %19s\n", &inout, loginName,
- &lval, ®istered, ipstr) != 5) {
+ if (fscanf(fp, "%d %19s " "%" SCNd64 " %d %19s\n", &inout,
+ loginName, &lval, ®istered, ipstr) != 5) {
fprintf(stderr, "FICS: Error in login info format. %s"
"\n", fname);
fclose(fp);
char loginName[MAX_LOGIN_NAME];
int inout, registered;
int ret, too_long;
- long int lval;
+ int64_t lval;
time_t last = 0;
ret = snprintf(fname, sizeof fname, "%s/player_data/%c/%s.%s",
_Static_assert(19 < ARRAY_SIZE(ipstr),
"'ipstr' too small");
- if (fscanf(fp, "%d %19s %ld %d %19s\n", &inout, loginName,
- &lval, ®istered, ipstr) != 5) {
+ if (fscanf(fp, "%d %19s " "%" SCNd64 " %d %19s\n", &inout,
+ loginName, &lval, ®istered, ipstr) != 5) {
fprintf(stderr, "FICS: Error in login info format. %s"
"\n", fname);
fclose(fp);