diff options
author | Aaron Brashears <aaronb@lindenlab.com> | 2007-02-02 17:28:58 +0000 |
---|---|---|
committer | Aaron Brashears <aaronb@lindenlab.com> | 2007-02-02 17:28:58 +0000 |
commit | 305c74d5163c5e344a675d39ca2394a9e45bd2c2 (patch) | |
tree | 42836c4a6010b2b015156024d3cfb6bf64a48ad6 /indra/newview/llviewerregion.cpp | |
parent | 54d89549df38bb61881583a3eb8d3645c107d79f (diff) |
Result of svn merge -r57264:57370 svn+ssh://svn/svn/linden/branches/adroit.r40-68 into release.
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rw-r--r-- | indra/newview/llviewerregion.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 09cbf494bc..fa68e25b0e 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -159,14 +159,14 @@ void LLViewerRegion::loadCache() LLVOCacheEntry *entry; - char filename[256]; - sprintf(filename, "%s%sobjects_%d_%d.slc", + char filename[256]; /* Flawfinder: ignore */ + snprintf(filename, sizeof(filename), "%s%sobjects_%d_%d.slc", /* Flawfinder: ignore */ gDirUtilp->getExpandedFilename(LL_PATH_CACHE,"").c_str(), gDirUtilp->getDirDelimiter().c_str(), U32(mHandle>>32)/REGION_WIDTH_UNITS, U32(mHandle)/REGION_WIDTH_UNITS ); - FILE *fp = LLFile::fopen(filename, "rb"); + FILE* fp = LLFile::fopen(filename, "rb"); /* Flawfinder: ignore */ if (!fp) { // might not have a file, which is normal @@ -240,14 +240,14 @@ void LLViewerRegion::saveCache() return; } - char filename[256]; - sprintf(filename, "%s%sobjects_%d_%d.slc", + char filename[256]; /* Flawfinder: ignore */ + snprintf(filename, sizeof(filename), "%s%sobjects_%d_%d.slc", /* Flawfinder: ignore */ gDirUtilp->getExpandedFilename(LL_PATH_CACHE,"").c_str(), gDirUtilp->getDirDelimiter().c_str(), U32(mHandle>>32)/REGION_WIDTH_UNITS, U32(mHandle)/REGION_WIDTH_UNITS ); - FILE *fp = LLFile::fopen(filename, "wb"); + FILE* fp = LLFile::fopen(filename, "wb"); /* Flawfinder: ignore */ if (!fp) { llwarns << "Unable to write cache file " << filename << llendl; @@ -481,9 +481,9 @@ char* SIM_ACCESS_STR[] = { "Free Trial", "Unknown" }; // static -const char* LLViewerRegion::accessToString(U8 access) +const char* LLViewerRegion::accessToString(U8 access) /* Flawfinder: ignore */ { - switch(access) + switch(access) /* Flawfinder: ignore */ { case SIM_ACCESS_TRIAL: return SIM_ACCESS_STR[0]; @@ -519,13 +519,13 @@ U8 LLViewerRegion::stringToAccess(const char* access_str) { access = SIM_ACCESS_MATURE; } - return access; + return access; /* Flawfinder: ignore */ } // static -const char* LLViewerRegion::accessToShortString(U8 access) +const char* LLViewerRegion::accessToShortString(U8 access) /* Flawfinder: ignore */ { - switch(access) + switch(access) /* Flawfinder: ignore */ { case SIM_ACCESS_PG: return "PG"; @@ -897,7 +897,7 @@ void LLViewerRegion::updateCoarseLocations(LLMessageSystem* msg) LLString LLViewerRegion::getInfoString() { - char tmp_buf[256]; + char tmp_buf[256]; /* Flawfinder: ignore */ LLString info; info = "Region: "; @@ -909,7 +909,7 @@ LLString LLViewerRegion::getInfoString() U32 x, y; from_region_handle(getHandle(), &x, &y); - sprintf(tmp_buf, "%d:%d", x, y); + snprintf(tmp_buf, sizeof(tmp_buf), "%d:%d", x, y); /* Flawfinder: ignore */ info += "Handle:"; info += tmp_buf; info += "\n"; @@ -1121,7 +1121,7 @@ void LLViewerRegion::unpackRegionHandshake() const S32 SIM_NAME_BUF = 256; U32 region_flags; U8 sim_access; - char sim_name[SIM_NAME_BUF]; + char sim_name[SIM_NAME_BUF]; /* Flawfinder: ignore */ LLUUID sim_owner; BOOL is_estate_manager; F32 water_height; |