diff options
author | Jeremy Allison <jra@samba.org> | 2007-12-07 17:32:32 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-12-07 17:32:32 -0800 |
commit | 42cfffae80480eae4381902fff3f7c61f858a933 (patch) | |
tree | 2fc1bc486fa988a4f2854310bcf91943db1aa566 /source3/lib/util_sock.c | |
parent | 25288b0e4472c728fc5a3a70c6c3e1f621ffae5f (diff) | |
download | samba-42cfffae80480eae4381902fff3f7c61f858a933.tar.gz samba-42cfffae80480eae4381902fff3f7c61f858a933.tar.bz2 samba-42cfffae80480eae4381902fff3f7c61f858a933.zip |
Remove next_token - all uses must now be next_token_talloc.
No more temptations to use static length strings.
Jeremy.
(This used to be commit ec003f39369910dee852b7cafb883ddaa321c2de)
Diffstat (limited to 'source3/lib/util_sock.c')
-rw-r--r-- | source3/lib/util_sock.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c index e49db340ae..e919cc5a46 100644 --- a/source3/lib/util_sock.c +++ b/source3/lib/util_sock.c @@ -785,9 +785,10 @@ static void print_socket_options(int s) void set_socket_options(int fd, const char *options) { - fstring tok; + TALLOC_CTX *ctx = talloc_stackframe(); + char *tok; - while (next_token(&options,tok," \t,", sizeof(tok))) { + while (next_token_talloc(ctx, &options, &tok," \t,")) { int ret=0,i; int value = 1; char *p; @@ -836,6 +837,7 @@ void set_socket_options(int fd, const char *options) } } + TALLOC_FREE(ctx); print_socket_options(fd); } |