]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/smux/types.cpp
Allow to start mod_rscript without subnets file
[stg.git] / projects / stargazer / plugins / other / smux / types.cpp
index 14117ce5c1ee7e9796a0ca64a652a89ea09b4ed7..eb09a73ce5c91d1acc074b26cb1f00ac8b6474af 100644 (file)
@@ -5,7 +5,7 @@
 
 #include "types.h"
 
-bool ParseArcs(const char * str, size_t length, unsigned * a, size_t * pos)
+bool ParseArcs(const char * str, ptrdiff_t length, unsigned * a, size_t * pos)
 {
 if (length == 0)
     return false;
@@ -53,12 +53,14 @@ return true;
 }
 
 OID::OID(const std::string & str)
+    : arcs()
 {
 if (!StringToArcs(str.c_str(), str.length(), arcs))
     throw std::runtime_error("Invalid oid");
 }
 
 OID::OID(const char * str, size_t length)
+    : arcs()
 {
 if (!StringToArcs(str, length, arcs))
     throw std::runtime_error("Invalid oid");
@@ -70,12 +72,14 @@ OID::OID(const std::vector<unsigned> & a)
 }
 
 OID::OID(const unsigned * a, size_t length)
+    : arcs()
 {
 std::vector<unsigned> newArcs(a, a + length);
 arcs.swap(newArcs);
 }
 
 OID::OID(OBJECT_IDENTIFIER_t * oid)
+    : arcs()
 {
 unsigned a[1024];
 int count = OBJECT_IDENTIFIER_get_arcs(oid, a, sizeof(a[0]), 1024);