[Patch v2 3/4] notmuch-restore: use debug version of talloc_strndup

2012-12-26 Thread da...@tethera.net
From: David Bremner 

This gives line numbers for better debugging.
---
 notmuch-restore.c |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/notmuch-restore.c b/notmuch-restore.c
index c93f1ac..6111977 100644
--- a/notmuch-restore.c
+++ b/notmuch-restore.c
@@ -88,10 +88,11 @@ parse_sup_line (void *ctx, char *line,
return 1;
 }

-*query_str = talloc_strndup (ctx, line + match[1].rm_so,
-match[1].rm_eo - match[1].rm_so);
-file_tags = talloc_strndup (ctx, line + match[2].rm_so,
-   match[2].rm_eo - match[2].rm_so);
+*query_str = talloc_strndup_debug (ctx, line + match[1].rm_so,
+  match[1].rm_eo - match[1].rm_so);
+
+file_tags = talloc_strndup_debug (ctx, line + match[2].rm_so,
+ match[2].rm_eo - match[2].rm_so);

 char *tok = file_tags;
 size_t tok_len = 0;
-- 
1.7.10.4



[Patch v2 3/4] notmuch-restore: use debug version of talloc_strndup

2012-12-26 Thread david
From: David Bremner brem...@debian.org

This gives line numbers for better debugging.
---
 notmuch-restore.c |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/notmuch-restore.c b/notmuch-restore.c
index c93f1ac..6111977 100644
--- a/notmuch-restore.c
+++ b/notmuch-restore.c
@@ -88,10 +88,11 @@ parse_sup_line (void *ctx, char *line,
return 1;
 }
 
-*query_str = talloc_strndup (ctx, line + match[1].rm_so,
-match[1].rm_eo - match[1].rm_so);
-file_tags = talloc_strndup (ctx, line + match[2].rm_so,
-   match[2].rm_eo - match[2].rm_so);
+*query_str = talloc_strndup_debug (ctx, line + match[1].rm_so,
+  match[1].rm_eo - match[1].rm_so);
+
+file_tags = talloc_strndup_debug (ctx, line + match[2].rm_so,
+ match[2].rm_eo - match[2].rm_so);
 
 char *tok = file_tags;
 size_t tok_len = 0;
-- 
1.7.10.4

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch