1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ctdb: Fix some "declarations after code" problems

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2014-09-04 11:21:24 +10:00 committed by Amitay Isaacs
parent 1d16555fa0
commit b0f9d33058
2 changed files with 3 additions and 2 deletions

View File

@ -47,8 +47,8 @@ static void log_fn(struct tdb_context *tdb, enum tdb_debug_level level, const ch
{
if (level <= TDB_DEBUG_ERROR) {
va_list ap;
this_log_level = level;
char newfmt[strlen(tdb_name(tdb)) + 1 + strlen(fmt) + 1];
this_log_level = level;
sprintf(newfmt, "%s:%s", tdb_name(tdb), fmt);
va_start(ap, fmt);
do_debug_v(newfmt, ap);

View File

@ -31,10 +31,11 @@
int
ctdb_control_getvnnmap(struct ctdb_context *ctdb, uint32_t opcode, TDB_DATA indata, TDB_DATA *outdata)
{
CHECK_CONTROL_DATA_SIZE(0);
struct ctdb_vnn_map_wire *map;
size_t len;
CHECK_CONTROL_DATA_SIZE(0);
len = offsetof(struct ctdb_vnn_map_wire, map) + sizeof(uint32_t)*ctdb->vnn_map->size;
map = talloc_size(outdata, len);
CTDB_NO_MEMORY(ctdb, map);