]> git.notmuchmail.org Git - notmuch/commitdiff
notmuch-restore: use debug version of talloc_strndup
authorDavid Bremner <bremner@debian.org>
Mon, 17 Dec 2012 03:14:42 +0000 (23:14 -0400)
committerDavid Bremner <bremner@debian.org>
Mon, 31 Dec 2012 01:12:11 +0000 (21:12 -0400)
This gives line numbers for better debugging.

notmuch-restore.c

index 9ed9b515754036ec285f2af214f52fe980d84771..d43546d345926c561bcdb1d91848377fa1184534 100644 (file)
@@ -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;