[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-unstable-718-gf9182bb
Jeremy Allison
jra at samba.org
Wed Dec 19 02:02:13 GMT 2007
The branch, v3-2-test has been updated
via f9182bbe628cb5f5395a08b2e09d4a282a99d7dc (commit)
from 39f3efbcc5fbdff1db1b12e5fc7368968f240993 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit f9182bbe628cb5f5395a08b2e09d4a282a99d7dc
Author: Jeremy Allison <jra at samba.org>
Date: Tue Dec 18 18:01:34 2007 -0800
Remove another static fstring.
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source/printing/lpq_parse.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/printing/lpq_parse.c b/source/printing/lpq_parse.c
index 56e228f..6dcddb6 100644
--- a/source/printing/lpq_parse.c
+++ b/source/printing/lpq_parse.c
@@ -444,7 +444,7 @@ static bool parse_lpq_hpux(char *line, print_queue_struct *buf, bool first)
{
/* must read two lines to process, therefore keep some values static */
static bool header_line_ok=False, base_prio_reset=False;
- static fstring jobuser;
+ static char *jobuser;
static int jobid;
static int jobprio;
static time_t jobtime;
@@ -511,7 +511,11 @@ static bool parse_lpq_hpux(char *line, print_queue_struct *buf, bool first)
buf->job = jobid;
buf->status = jobstat;
buf->priority = jobprio;
- fstrcpy(buf->fs_user,jobuser);
+ if (jobuser) {
+ fstrcpy(buf->fs_user,jobuser);
+ } else {
+ buf->fs_user[0] = '\0';
+ }
TALLOC_FREE(frame);
return True;
@@ -548,7 +552,8 @@ static bool parse_lpq_hpux(char *line, print_queue_struct *buf, bool first)
return False;
}
jobid = atoi(tok[1]);
- fstrcpy(jobuser,tok[2]);
+ SAFE_FREE(jobuser);
+ jobuser = SMB_STRDUP(tok[2]);
jobprio = atoi(tok[4]);
/* process time */
--
Samba Shared Repository
More information about the samba-cvs
mailing list