Browse Source

Merge pull request #162 from trapexit/intsizes

fix minor integer casting issues
pull/163/head
Antonio SJ Musumeci 9 years ago
parent
commit
e84c458cad
  1. 2
      src/config.cpp
  2. 4
      src/getxattr.cpp

2
src/config.cpp

@ -33,7 +33,7 @@
#include "rwlock.hpp" #include "rwlock.hpp"
#include "fs.hpp" #include "fs.hpp"
#define MINFREESPACE_DEFAULT (4294967295)
#define MINFREESPACE_DEFAULT (4294967295ULL)
#define POLICYINIT(X) X(policies[FuseFunc::Enum::X]) #define POLICYINIT(X) X(policies[FuseFunc::Enum::X])
using std::string; using std::string;

4
src/getxattr.cpp

@ -117,8 +117,10 @@ _getxattr_controlfile_minfreespace(const Config &config,
string &attrvalue) string &attrvalue)
{ {
char buf[64]; char buf[64];
unsigned long long minfreespace;
snprintf(buf,sizeof(buf),"%li",config.minfreespace);
minfreespace = (unsigned long long)config.minfreespace;
snprintf(buf,sizeof(buf),"%llu",minfreespace);
attrvalue = buf; attrvalue = buf;
} }

Loading…
Cancel
Save