]> git.notmuchmail.org Git - notmuch/blobdiff - json.c
json_quote_chararray: Always return a newly talloced array
[notmuch] / json.c
diff --git a/json.c b/json.c
index 3fd923ca787cf62ba3ea4788d976212beb981dba..817fc83a3de060eb954575138a7c2c50471982ea 100644 (file)
--- a/json.c
+++ b/json.c
@@ -57,9 +57,6 @@ json_quote_chararray(const void *ctx, const char *str, const size_t len)
     size_t loop;
     size_t required;
 
-    if (len == 0)
-       return (char *)"\"\"";
-
     for (loop = 0, required = 0, ptr = str;
         loop < len;
         loop++, required++, ptr++) {