[PATCH v2 1/2] show: don't use hex literals in JSON output
[notmuch-archives.git] / 7c / 8f6fd9e999a7d7f0ce5692c9a3bf3dbe04de6f
diff --git a/7c/8f6fd9e999a7d7f0ce5692c9a3bf3dbe04de6f b/7c/8f6fd9e999a7d7f0ce5692c9a3bf3dbe04de6f
new file mode 100644 (file)
index 0000000..088eb2c
--- /dev/null
@@ -0,0 +1,74 @@
+Return-Path: <schnouki@schnouki.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 65CD5429E3B\r
+       for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 02:51:12 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.1\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id bHqzcNgLEP1L for <notmuch@notmuchmail.org>;\r
+       Tue, 17 Jan 2012 02:51:08 -0800 (PST)\r
+Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222])\r
+       by olra.theworths.org (Postfix) with ESMTP id AEF74429E2F\r
+       for <notmuch@notmuchmail.org>; Tue, 17 Jan 2012 02:51:08 -0800 (PST)\r
+Received: from thor.loria.fr (thor.loria.fr [152.81.12.250])\r
+       by ks3536.kimsufi.com (Postfix) with ESMTPSA id E51D66A002A;\r
+       Tue, 17 Jan 2012 11:51:07 +0100 (CET)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;\r
+       s=key-schnouki; t=1326797468;\r
+       bh=eEEwb9ekZaZhwqnf7kfbYYoRAJ5IvE6X8h+LQMvEPiU=;\r
+       h=From:To:Subject:Date:Message-Id:In-Reply-To:References;\r
+       b=Uu9cONIyk4jH29MhIa6BQ4Sk7nApRDtnSyhYIryaPOg6auq+enTXKQ+a+JCgKLZ9r\r
+       udGnlK2IdazDsK5c28jPnI0K7wP9PXDIAobuwPKTqmZQQOpUVyeoL4jHrIas7Ocw2a\r
+       gPBgFGqZhmr73hrpfLrmLf4VKZkgmIquZT23oFzc=\r
+From: Thomas Jost <schnouki@schnouki.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 1/2] show: don't use hex literals in JSON output\r
+Date: Tue, 17 Jan 2012 11:50:52 +0100\r
+Message-Id: <1326797453-9405-1-git-send-email-schnouki@schnouki.net>\r
+X-Mailer: git-send-email 1.7.8.3\r
+In-Reply-To: <8739bea9lc.fsf@thor.loria.fr>\r
+References: <8739bea9lc.fsf@thor.loria.fr>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 17 Jan 2012 10:51:12 -0000\r
+\r
+JSON does not support hex literals (0x..) so numbers must be formatted as %d\r
+instead of %x.\r
+---\r
+ notmuch-show.c |    2 +-\r
+ 1 files changed, 1 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/notmuch-show.c b/notmuch-show.c\r
+index d14dac9..91f566c 100644\r
+--- a/notmuch-show.c\r
++++ b/notmuch-show.c\r
+@@ -641,7 +641,7 @@ format_part_sigstatus_json (const GMimeSignatureValidity* validity)\r
+                printf (", \"keyid\": %s", json_quote_str (ctx_quote, signer->keyid));\r
+        }\r
+        if (signer->errors != GMIME_SIGNER_ERROR_NONE) {\r
+-           printf (", \"errors\": %x", signer->errors);\r
++           printf (", \"errors\": %d", signer->errors);\r
+        }\r
\r
+        printf ("}");\r
+-- \r
+1.7.8.3\r
+\r