[Groonga-commit] groonga/groonga [master] fix wrong cast positoin.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 3月 10日 (木) 16:53:33 JST


Kouhei Sutou	2011-03-10 07:53:33 +0000 (Thu, 10 Mar 2011)

  New Revision: 34e01ec64c1aac744c37d867f8002ae2aee51ed4

  Log:
    fix wrong cast positoin.

  Modified files:
    lib/db.c
    test/unit/story/test-taiyaki.c

  Modified: lib/db.c (+1 -1)
===================================================================
--- lib/db.c    2011-03-10 06:31:48 +0000 (4af3a1f)
+++ lib/db.c    2011-03-10 07:53:33 +0000 (b2e8a99)
@@ -3873,7 +3873,7 @@ grn_obj_is_persistent(grn_ctx *ctx, grn_obj *obj)
 #define DEGREE_ACCURACY 10000000
 
 #define DEGREE2MSEC(degree)\
-  ((int)((int)(degree * 60 * 60 * 1000) +\
+  ((int)(((int)degree * 60 * 60 * 1000) +\
          (((long)(degree * DEGREE_ACCURACY) % DEGREE_ACCURACY) * 60 / DEGREE_ACCURACY * 60 * 1000) +\
          (((long)(degree * DEGREE_ACCURACY) % DEGREE_ACCURACY) * 60 % DEGREE_ACCURACY * 60 / 10000)))
 

  Modified: test/unit/story/test-taiyaki.c (+4 -4)
===================================================================
--- test/unit/story/test-taiyaki.c    2011-03-10 06:31:48 +0000 (0abc484)
+++ test/unit/story/test-taiyaki.c    2011-03-10 07:53:33 +0000 (7dd8b99)
@@ -216,7 +216,7 @@ test_in_rectangle_over_latitude1(void)
     GRN_INVALID_ARGUMENT,
     "geo_in_rectangle(): geo point1's latitude is too big: "
     "<324000000>(max:324000000): "
-    "(324000000,505723679) (130508208,505954080)",
+    "(324000000,503061840) (128254104,503177040)",
     "select Shops "
     "--sortby '+name' "
     "--output_columns 'name, location' "
@@ -232,7 +232,7 @@ test_in_rectangle_over_longitude1(void)
     GRN_INVALID_ARGUMENT,
     "geo_in_rectangle(): geo point1's longitude is too big: "
     "<648000000>(max:648000000): "
-    "(131281920,648000000) (130508208,505954080)",
+    "(128640960,648000000) (128254104,503177040)",
     "select Shops "
     "--sortby '+name' "
     "--output_columns 'name, location' "
@@ -248,7 +248,7 @@ test_in_rectangle_over_latitude2(void)
     GRN_INVALID_ARGUMENT,
     "geo_in_rectangle(): geo point2's latitude is too big: "
     "<324000000>(max:324000000): "
-    "(131281920,505723679) (324000000,505954080)",
+    "(128640960,503061840) (324000000,503177040)",
     "select Shops "
     "--sortby '+name' "
     "--output_columns 'name, location' "
@@ -264,7 +264,7 @@ test_in_rectangle_over_longitude2(void)
     GRN_INVALID_ARGUMENT,
     "geo_in_rectangle(): geo point2's longitude is too big: "
     "<648000000>(max:648000000): "
-    "(131281920,505723679) (130508208,648000000)",
+    "(128640960,503061840) (128254104,648000000)",
     "select Shops "
     "--sortby '+name' "
     "--output_columns 'name, location' "




Groonga-commit メーリングリストの案内
Back to archive index