mirror of
https://github.com/vgough/encfs.git
synced 2024-11-21 23:43:26 +01:00
modernize: use bool literals, raw string literal
This commit is contained in:
parent
5a99506ea8
commit
169101c80b
@ -22,7 +22,8 @@
|
||||
#ifdef linux
|
||||
#define _XOPEN_SOURCE 500 // make sure pwrite() is pulled in
|
||||
#endif
|
||||
#define _BSD_SOURCE // pick up setenv on RH7.3
|
||||
#define _BSD_SOURCE // pick up setenv on RH7.3
|
||||
#define _DEFAULT_SOURCE // Replaces _BSD_SOURCE
|
||||
|
||||
#include "internal/easylogging++.h"
|
||||
#include <cctype>
|
||||
@ -1416,7 +1417,7 @@ std::string readPassword(int FD) {
|
||||
char buffer[1024];
|
||||
string result;
|
||||
|
||||
while (1) {
|
||||
while (true) {
|
||||
ssize_t rdSize = recv(FD, buffer, sizeof(buffer), 0);
|
||||
|
||||
if (rdSize > 0) {
|
||||
|
@ -139,7 +139,7 @@ class NameIO {
|
||||
delete[] Name; \
|
||||
Name = Name##_Raw; \
|
||||
} \
|
||||
} while (0);
|
||||
} while (false);
|
||||
|
||||
} // namespace encfs
|
||||
|
||||
|
@ -101,7 +101,7 @@ bool XmlValue::readB64(const char *path, unsigned char *data,
|
||||
return false;
|
||||
}
|
||||
if (!B64StandardDecode(data, (unsigned char *)s.data(), s.size())) {
|
||||
RLOG(ERROR) << "B64 decode failure on \"" << s << "\"";
|
||||
RLOG(ERROR) << R"(B64 decode failure on ")" << s << R"(")";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ static void FuseUsage() {
|
||||
do { \
|
||||
rAssert(out->fuseArgc < MaxFuseArgs); \
|
||||
out->fuseArgv[out->fuseArgc++] = (ARG); \
|
||||
} while (0)
|
||||
} while (false)
|
||||
|
||||
static string slashTerminate(const string &src) {
|
||||
string result = src;
|
||||
@ -233,7 +233,7 @@ static bool processArgs(int argc, char *argv[],
|
||||
{"require-macs", 0, nullptr, LONG_OPT_REQUIRE_MAC}, // require MACs
|
||||
{nullptr, 0, nullptr, 0}};
|
||||
|
||||
while (1) {
|
||||
while (true) {
|
||||
int option_index = 0;
|
||||
|
||||
// 's' : single-threaded mode
|
||||
|
Loading…
Reference in New Issue
Block a user