All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] use type double in creating floating point JSON values
@ 2016-12-13 20:55 Vincent Fu
  2016-12-16 17:57 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent Fu @ 2016-12-13 20:55 UTC (permalink / raw)
  To: Jens Axboe, fio

[-- Attachment #1: Type: text/plain, Size: 907 bytes --]

struct json_value uses a double to store floating point values. Have
json_create_value_float also take a double (instead of a float) as an
argument.


--
Vincent Fu
Software Dev Engr II
SanDisk, a Western Digital brand
Email: Vincent.Fu@SanDisk.com
Office: 801 987 7079

PLEASE NOTE: The information contained in this electronic mail message is intended only for the use of the designated recipient(s) named above. If the reader of this message is not the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify the sender by telephone or e-mail (as shown above) immediately and destroy any and all copies of this message in your possession (whether hard copies or electronically stored copies).

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-use-type-double-in-creating-floating-point-JSON-valu.patch --]
[-- Type: text/x-patch; name="0001-use-type-double-in-creating-floating-point-JSON-valu.patch", Size: 856 bytes --]

From e20e89350c72284a0dd78eed1bcdc4bd6f019c00 Mon Sep 17 00:00:00 2001
From: Vincent Fu <Vincent.Fu@sandisk.com>
Date: Tue, 13 Dec 2016 15:40:46 -0500
Subject: [PATCH] use type double in creating floating point JSON values

struct json_value uses a double to store floating point values. Have json_create_value_float also take a double (instead of a float) as an argument.
---
 json.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/json.c b/json.c
index 190fa9e..e0227ec 100644
--- a/json.c
+++ b/json.c
@@ -40,7 +40,7 @@ static struct json_value *json_create_value_int(long long number)
 	return value;
 }
 
-static struct json_value *json_create_value_float(float number)
+static struct json_value *json_create_value_float(double number)
 {
 	struct json_value *value = malloc(sizeof(struct json_value));
 
-- 
2.7.4 (Apple Git-66)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] use type double in creating floating point JSON values
  2016-12-13 20:55 [PATCH] use type double in creating floating point JSON values Vincent Fu
@ 2016-12-16 17:57 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2016-12-16 17:57 UTC (permalink / raw)
  To: Vincent Fu, fio

On 12/13/2016 01:55 PM, Vincent Fu wrote:
> struct json_value uses a double to store floating point values. Have
> json_create_value_float also take a double (instead of a float) as an
> argument.

Applied, thanks Vincent.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-16 17:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-13 20:55 [PATCH] use type double in creating floating point JSON values Vincent Fu
2016-12-16 17:57 ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.