summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2017-07-12 13:14:08 +0200
committerAndreas Schneider <asn@cryptomilk.org>2017-07-25 09:14:19 +0200
commit924e7f7c80b203e147823f802926c323d9402248 (patch)
tree117f37702c38600ecf7af772fc61acbd70511018
parenta19b08c9c315279bc0afec09a0a409de168084b4 (diff)
downloadsamba-924e7f7c80b203e147823f802926c323d9402248.tar.gz
s3:printing: Fix setting the first jobnum
This is just something logical. The define is called first jobnum but the first one was always 101. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source3/printing/tests/vlp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/printing/tests/vlp.c b/source3/printing/tests/vlp.c
index 54a62f1c19d..d596c3141ab 100644
--- a/source3/printing/tests/vlp.c
+++ b/source3/printing/tests/vlp.c
@@ -29,7 +29,7 @@
#undef malloc
#endif
-#define PRINT_FIRSTJOB "100"
+#define PRINT_FIRSTJOB 100
static TDB_CONTEXT *tdb;
@@ -97,10 +97,11 @@ static int next_jobnum(char *printer)
/* Create next job index if none exists */
if (jobnum == -1) {
- jobnum = atoi(PRINT_FIRSTJOB);
+ jobnum = PRINT_FIRSTJOB;
+ } else {
+ jobnum++;
}
- jobnum++;
tdb_store_int32(tdb, keystr, jobnum);
tdb_unlock_bystring(tdb, keystr);