summaryrefslogtreecommitdiff
path: root/source3/printing/printfsp.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-03-01 11:39:44 +0100
committerVolker Lendecke <vl@samba.org>2009-03-01 12:27:55 +0100
commit4a35c974e97551b1ccbfa41d4c08f0598e3c26aa (patch)
tree0b4be816a1cfef54cada3a5c0d4530f9960ddbf1 /source3/printing/printfsp.c
parent79fc0ddaf44af1e31d7e6f2c6f576fd3c05e087d (diff)
downloadsamba-4a35c974e97551b1ccbfa41d4c08f0598e3c26aa.tar.gz
samba-4a35c974e97551b1ccbfa41d4c08f0598e3c26aa.tar.bz2
samba-4a35c974e97551b1ccbfa41d4c08f0598e3c26aa.zip
Only copy sharename up from rap_to_pjobid
Why?? :-) Another one of the little micro-optimizations that I just came across: If you allocate a variable in a sub-block like the "fstring sharename" in write_file(), gcc even with -O3 will allocate this variable unconditionally on the stack at the beginning of the routine. So with eliminating this fstring we cut 256 bytes of stack in a very hot code path writing to a file. It might make us a bit more cache-friendly. This would probably not be worth a second look if it involved larger code changes, but this one was just too simple to let it pass :-)
Diffstat (limited to 'source3/printing/printfsp.c')
-rw-r--r--source3/printing/printfsp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/printing/printfsp.c b/source3/printing/printfsp.c
index b485711f91..243b8ea03b 100644
--- a/source3/printing/printfsp.c
+++ b/source3/printing/printfsp.c
@@ -88,7 +88,6 @@ NTSTATUS print_fsp_open(struct smb_request *req, connection_struct *conn,
void print_fsp_end(files_struct *fsp, enum file_close_type close_type)
{
uint32 jobid;
- fstring sharename;
if (fsp->fh->private_options & FILE_DELETE_ON_CLOSE) {
/*
@@ -102,7 +101,7 @@ void print_fsp_end(files_struct *fsp, enum file_close_type close_type)
string_free(&fsp->fsp_name);
}
- if (!rap_to_pjobid(fsp->rap_print_jobid, sharename, &jobid)) {
+ if (!rap_to_pjobid(fsp->rap_print_jobid, NULL, &jobid)) {
DEBUG(3,("print_fsp_end: Unable to convert RAP jobid %u to print jobid.\n",
(unsigned int)fsp->rap_print_jobid ));
return;