]> git.eshelyaron.com Git - emacs.git/commitdiff
; * src/json.c (lisp_to_json): Inline an unnecessary variable.
authorPhilipp Stephani <phst@google.com>
Mon, 18 Dec 2017 23:01:54 +0000 (00:01 +0100)
committerPhilipp Stephani <phst@google.com>
Mon, 18 Dec 2017 23:13:02 +0000 (00:13 +0100)
src/json.c

index 5849705952da42d8c3f90e278ed1c53565481043..82f670a163e2b5ed91d48054397d2e8be8f01137 100644 (file)
@@ -376,8 +376,7 @@ lisp_to_json (Lisp_Object lisp)
   else if (STRINGP (lisp))
     {
       Lisp_Object encoded = json_encode (lisp);
-      ptrdiff_t size = SBYTES (encoded);
-      return json_check (json_stringn (SSDATA (encoded), size));
+      return json_check (json_stringn (SSDATA (encoded), SBYTES (encoded)));
     }
 
   /* LISP now must be a vector or hashtable.  */