summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-17 16:20:44 -0800
committerJeremy Allison <jra@samba.org>2007-12-17 16:20:44 -0800
commitc8071c3522abefb651596e2335e724ae50cb8a90 (patch)
tree6dbcf7d20cc381703087eb02f0b5f14bf5d22dc7 /source3/lib
parentd9682dfb5918c20516d45de20c4f3d5824572e20 (diff)
downloadsamba-c8071c3522abefb651596e2335e724ae50cb8a90.tar.gz
samba-c8071c3522abefb651596e2335e724ae50cb8a90.tar.bz2
samba-c8071c3522abefb651596e2335e724ae50cb8a90.zip
Use the %*s feature of snprintf to remove anothe static fstring.
Jeremy. (This used to be commit 4ae4b2358688bf289305a2db0ed01b653ac073b2)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 73b035b22b..11c14ea538 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -2227,17 +2227,12 @@ void dump_data_pw(const char *msg, const uchar * data, size_t len)
#endif
}
-char *tab_depth(int depth)
+const char *tab_depth(int level, int depth)
{
- static fstring spaces;
- size_t len = depth * 4;
- if (len > sizeof(fstring)-1) {
- len = sizeof(fstring)-1;
+ if( DEBUGLVL(level) ) {
+ dbgtext("%*s", depth*4, "");
}
-
- memset(spaces, ' ', len);
- spaces[len] = 0;
- return spaces;
+ return "";
}
/*****************************************************************************