From d372f36c03d7668ca327e5dadf1cba0d10c40dc5 Mon Sep 17 00:00:00 2001 From: Karolin Seeger Date: Wed, 23 Jul 2008 17:07:56 +0200 Subject: [PATCH] talloc_string_sub2: Don't return NULL if src is empty. This fixes the printjob update (finished jobs were not removed from the $PRINTER.tdb file). Signed-off by Michael Adam --- source/lib/util_str.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/source/lib/util_str.c b/source/lib/util_str.c index 6678c0c..c36d512 100644 --- a/source/lib/util_str.c +++ b/source/lib/util_str.c @@ -1231,7 +1231,7 @@ char *talloc_string_sub2(TALLOC_CTX *mem_ctx, const char *src, char *string; ssize_t ls,lp,li,ld, i; - if (!insert || !pattern || !*pattern || !src || !*src) { + if (!insert || !pattern || !*pattern || !src) { return NULL; } -- 1.5.4.4