[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-unstable-299-gb9d79fb
Jeremy Allison
jra at samba.org
Sun Nov 11 21:27:49 GMT 2007
The branch, v3-2-test has been updated
via b9d79fb509a6c59fdd73b016be5f4da3435c7789 (commit)
via f213556f50de4a28b5c5d2e1e762013837feb722 (commit)
via 329c688e4a9e69b71996fd1b0eee2202a849f3f5 (commit)
from 432d0e9cb2370e52f7d4cb58d2da747e526403e8 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit b9d79fb509a6c59fdd73b016be5f4da3435c7789
Merge: f213556f50de4a28b5c5d2e1e762013837feb722 432d0e9cb2370e52f7d4cb58d2da747e526403e8
Author: Jeremy Allison <jra at samba.org>
Date: Sun Nov 11 13:18:22 2007 -0800
Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
commit f213556f50de4a28b5c5d2e1e762013837feb722
Author: Volker Lendecke <vl at sernet.de>
Date: Sun Nov 11 15:50:16 2007 +0100
Remove a static fstring
Feel free to push :-)
Volker
commit 329c688e4a9e69b71996fd1b0eee2202a849f3f5
Author: Volker Lendecke <vl at sernet.de>
Date: Sun Nov 11 15:38:50 2007 +0100
Remove a static fstring
I'm not sure why this used to be static, to me it seems that every time this
variable is overwritten. I just don't see how name_status_find() could return
true and not overwrite name. Can someone please review this and potentially
check it in?
Thanks,
Volker
-----------------------------------------------------------------------
Summary of changes:
source/libsmb/cliconnect.c | 2 +-
source/libsmb/cliquota.c | 23 ++++++++++++-----------
2 files changed, 13 insertions(+), 12 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c
index 2fdd122..f0b03a8 100644
--- a/source/libsmb/cliconnect.c
+++ b/source/libsmb/cliconnect.c
@@ -1806,7 +1806,7 @@ struct cli_state *get_ipc_connect(char *server,
struct cli_state *get_ipc_connect_master_ip(struct ip_service *mb_ip, pstring workgroup, struct user_auth_info *user_info)
{
char addr[INET6_ADDRSTRLEN];
- static fstring name;
+ fstring name;
struct cli_state *cli;
struct sockaddr_storage server_ss;
diff --git a/source/libsmb/cliquota.c b/source/libsmb/cliquota.c
index 1932c04..690da59 100644
--- a/source/libsmb/cliquota.c
+++ b/source/libsmb/cliquota.c
@@ -562,26 +562,26 @@ cleanup:
return ret;
}
-static char *quota_str_static(SMB_BIG_UINT val, bool special, bool _numeric)
+static const char *quota_str_static(SMB_BIG_UINT val, bool special, bool _numeric)
{
- static fstring buffer;
-
- memset(buffer,'\0',sizeof(buffer));
+ const char *result;
if (!_numeric&&special&&(val == SMB_NTQUOTAS_NO_LIMIT)) {
- fstr_sprintf(buffer,"NO LIMIT");
- return buffer;
+ return "NO LIMIT";
}
#if defined(HAVE_LONGLONG)
- fstr_sprintf(buffer,"%llu",val);
+ result = talloc_asprintf(talloc_tos(), "%llu", val);
#else
- fstr_sprintf(buffer,"%lu",val);
-#endif
- return buffer;
+ result = talloc_asprintf(talloc_tos(), "%lu", val);
+#endif
+ SMB_ASSERT(result != NULL);
+ return result;
}
void dump_ntquota(SMB_NTQUOTA_STRUCT *qt, bool _verbose, bool _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, bool _numeric))
{
+ TALLOC_CTX *frame = talloc_stackframe();
+
if (!qt) {
smb_panic("dump_ntquota() called with NULL pointer");
}
@@ -626,8 +626,9 @@ void dump_ntquota(SMB_NTQUOTA_STRUCT *qt, bool _verbose, bool _numeric, void (*_
break;
default:
d_printf("dump_ntquota() invalid qtype(%d)\n",qt->qtype);
- return;
}
+ TALLOC_FREE(frame);
+ return;
}
void dump_ntquota_list(SMB_NTQUOTA_LIST **qtl, bool _verbose, bool _numeric, void (*_sidtostring)(fstring str, DOM_SID *sid, bool _numeric))
--
Samba Shared Repository
More information about the samba-cvs
mailing list