fixed compile error
This commit is contained in:
parent
6e161cbf88
commit
69695656a1
@ -57,13 +57,14 @@ static
|
|||||||
char *get_prefix_buf(int len, int node_id)
|
char *get_prefix_buf(int len, int node_id)
|
||||||
{
|
{
|
||||||
char tmp_buf[sizeof("ndb_pid#########")+1];
|
char tmp_buf[sizeof("ndb_pid#########")+1];
|
||||||
|
char *buf;
|
||||||
if (node_id > 0)
|
if (node_id > 0)
|
||||||
snprintf(tmp_buf, sizeof(tmp_buf), "ndb_%u", node_id);
|
snprintf(tmp_buf, sizeof(tmp_buf), "ndb_%u", node_id);
|
||||||
else
|
else
|
||||||
snprintf(tmp_buf, sizeof(tmp_buf), "ndb_pid%u", getpid());
|
snprintf(tmp_buf, sizeof(tmp_buf), "ndb_pid%u", getpid());
|
||||||
tmp_buf[sizeof(tmp_buf)-1]= 0;
|
tmp_buf[sizeof(tmp_buf)-1]= 0;
|
||||||
|
|
||||||
char *buf= NdbConfig_AllocHomePath(len+strlen(tmp_buf));
|
buf= NdbConfig_AllocHomePath(len+strlen(tmp_buf));
|
||||||
strcat(buf, tmp_buf);
|
strcat(buf, tmp_buf);
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user