Commit 93746798 authored by Drake Arconis's avatar Drake Arconis
Browse files

Random waffles

parent 6a078735
......@@ -278,7 +278,7 @@ bool LLFile::copy(const std::string from, const std::string to)
char buf[16384]; /* Flawfinder: ignore */
size_t readbytes;
bool write_ok = true;
while(write_ok && (readbytes = fread(buf, 1, 16384, in))) /* Flawfinder: ignore */
while(write_ok && (readbytes = fread(buf, 1, 16384 * sizeof(char), in))) /* Flawfinder: ignore */
{
if (fwrite(buf, 1, readbytes, out) != readbytes)
{
......
......@@ -141,9 +141,8 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, S32 max_bytes)
}
header = hdr_buf;
std::string::size_type start = std::string::npos;
std::string::size_type start = header.find_first_not_of("<? ");
std::string::size_type end = std::string::npos;
start = header.find_first_not_of("<? ");
if (start != std::string::npos)
{
end = header.find_first_of(" ?", start);
......
......@@ -222,7 +222,7 @@ void LLSingletonBase::capture_dependency(list_t& initializing, EInitState initSt
if (found != initializing.end())
{
list_t::const_iterator it_next = found;
it_next++;
++it_next;
// Report the circularity. Requiring the coder to dig through the
// logic to diagnose exactly how we got here is less than helpful.
......
......@@ -838,11 +838,11 @@ void LLStringOps::setupDayFormat(const std::string& data)
}
std::string LLStringOps::getDatetimeCode (std::string key)
std::string LLStringOps::getDatetimeCode(const std::string& key)
{
std::map<std::string, std::string>::iterator iter;
iter = datetimeToCodes.find (key);
iter = datetimeToCodes.find(key);
if (iter != datetimeToCodes.end())
{
return iter->second;
......
......@@ -204,7 +204,7 @@ public:
// currently in daylight savings time?
static bool getPacificDaylightTime(void) { return sPacificDaylightTime;}
static std::string getDatetimeCode (std::string key);
static std::string getDatetimeCode (const std::string& key);
};
/**
......
......@@ -1251,7 +1251,7 @@ BOOL gzip_file(const std::string& srcfile, const std::string& dstfile)
src = LLFile::fopen(srcfile, "rb"); /* Flawfinder: ignore */
if (! src) goto err;
while ((bytes = (S32)fread(buffer, sizeof(U8), COMPRESS_BUFFER_SIZE, src)) > 0)
while ((bytes = (S32)fread(buffer, sizeof(U8), COMPRESS_BUFFER_SIZE * sizeof(U8), src)) > 0)
{
if (gzwrite(dst, buffer, bytes) <= 0)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment