optimized buffersizes
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sat, 8 May 2004 01:26:23 +0000 (01:26 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sat, 8 May 2004 01:26:23 +0000 (01:26 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1542 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/lib/getvserverbyctx-compat.hc
util-vserver/lib/getvserverctx.c

index 9dcd49a..c1e7198 100644 (file)
@@ -37,7 +37,7 @@ vc_getVserverByCtx_compat(xid_t ctx, vcCfgStyle *style, char const *revdir)
   vcCfgStyle   cur_style = vcCFG_NONE;
   size_t       l = strlen(revdir);
   size_t       l1;
-  char         path[l + sizeof(unsigned int)*3 + 2 + sizeof("/name")];
+  char         path[l + sizeof(unsigned int)*3 + 3];
 
   strcpy(path, revdir);
   path[l]      = '/';
index b565e4e..5334a5c 100644 (file)
@@ -64,7 +64,7 @@ xid_t
 vc_getVserverCtx(char const *id, vcCfgStyle style, bool honor_static, bool *is_running)
 {
   size_t               l1 = strlen(id);
-  char                 buf[sizeof(CONFDIR "//") + l1 + sizeof("/run")];
+  char                 buf[sizeof(CONFDIR "//") + l1 + sizeof("/context")];
                            
   if (style==vcCFG_NONE || style==vcCFG_AUTO)
     style = vc_getVserverCfgStyle(id);