summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2009-10-14 00:19:35 +0200
committerBjörn Jacke <bj@sernet.de>2009-10-14 00:19:35 +0200
commit6deb1fcc8899c9d462a30712bcc20019819fc176 (patch)
tree0a950d412bcdb1839a1de7e57ec63597ec4957c8 /source3/utils
parent8a27fdea89bc54aa35e363a376836662103c7cb7 (diff)
downloadsamba-6deb1fcc8899c9d462a30712bcc20019819fc176.tar.gz
samba-6deb1fcc8899c9d462a30712bcc20019819fc176.tar.bz2
samba-6deb1fcc8899c9d462a30712bcc20019819fc176.zip
s3:net simplify padding to single printf call
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 0e325b5269..455405a3ee 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -5777,18 +5777,12 @@ static NTSTATUS rpc_query_domain_sid(struct net_context *c,
static void print_trusted_domain(DOM_SID *dom_sid, const char *trusted_dom_name)
{
- fstring ascii_sid, padding;
- int pad_len, col_len = 20;
+ fstring ascii_sid;
/* convert sid into ascii string */
sid_to_fstring(ascii_sid, dom_sid);
- /* calculate padding space for d_printf to look nicer */
- pad_len = col_len - strlen(trusted_dom_name);
- padding[pad_len] = 0;
- do padding[--pad_len] = ' '; while (pad_len);
-
- d_printf("%s%s%s\n", trusted_dom_name, padding, ascii_sid);
+ d_printf("%-20s%s\n", trusted_dom_name, ascii_sid);
}
static NTSTATUS vampire_trusted_domain(struct rpc_pipe_client *pipe_hnd,