[PATCH] use type double in creating floating point JSON values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx
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).
From e20e89350c72284a0dd78eed1bcdc4bd6f019c00 Mon Sep 17 00:00:00 2001
From: Vincent Fu <Vincent.Fu@xxxxxxxxxxx>
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)


[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux