diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-04-18 00:14:12 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-04-18 00:14:12 -0700 |
| commit | 7831c4bfef2c340de01ff08461bd7f6a0e54ce32 (patch) | |
| tree | 0726bc6c54ea7c389fcb972a8f672fbee0183153 /node/Utils.cpp | |
| parent | 5f45977e3e3b912269ed5745423ad330be803964 (diff) | |
| download | infinitytier-7831c4bfef2c340de01ff08461bd7f6a0e54ce32.tar.gz infinitytier-7831c4bfef2c340de01ff08461bd7f6a0e54ce32.zip | |
Cleanup, dead code removal, some pretty insignificant security stuff that's based on recommendations.
Diffstat (limited to 'node/Utils.cpp')
| -rw-r--r-- | node/Utils.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/node/Utils.cpp b/node/Utils.cpp index 95b66337..0b1677e1 100644 --- a/node/Utils.cpp +++ b/node/Utils.cpp @@ -395,22 +395,6 @@ std::string Utils::trim(const std::string &s) return s.substr(start,end - start); } -void Utils::stdsprintf(std::string &s,const char *fmt,...) - throw(std::bad_alloc,std::length_error) -{ - char buf[65536]; - va_list ap; - - va_start(ap,fmt); - int n = vsnprintf(buf,sizeof(buf),fmt,ap); - va_end(ap); - - if ((n >= (int)sizeof(buf))||(n < 0)) - throw std::length_error("printf result too large"); - - s.append(buf); -} - unsigned int Utils::snprintf(char *buf,unsigned int len,const char *fmt,...) throw(std::length_error) { |
