]> sourceware.org Git - glibc.git/commitdiff
x86: Use SIZE_MAX instead of (long int)-1 for tunable range value
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Wed, 3 Feb 2021 14:33:19 +0000 (20:03 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Wed, 10 Feb 2021 13:38:33 +0000 (19:08 +0530)
The tunable types are SIZE_T, so set the ranges to the correct maximum
value, i.e. SIZE_MAX.

sysdeps/x86/dl-cacheinfo.h

index e5d23e676e7c0f19ecff5db96b58c75ff65a27b8..f3de206dc1e1e13dd69c74f03a228dfd8cea69d8 100644 (file)
@@ -929,14 +929,14 @@ dl_init_cacheinfo (struct cpu_features *cpu_features)
   rep_stosb_threshold = TUNABLE_GET (x86_rep_stosb_threshold,
                                     long int, NULL);
 
-  TUNABLE_SET_WITH_BOUNDS (x86_data_cache_size, data, 0, (long int) -1);
-  TUNABLE_SET_WITH_BOUNDS (x86_shared_cache_size, shared, 0, (long int) -1);
+  TUNABLE_SET_WITH_BOUNDS (x86_data_cache_size, data, 0, SIZE_MAX);
+  TUNABLE_SET_WITH_BOUNDS (x86_shared_cache_size, shared, 0, SIZE_MAX);
   TUNABLE_SET_WITH_BOUNDS (x86_non_temporal_threshold, non_temporal_threshold,
-                          0, (long int) -1);
+                          0, SIZE_MAX);
   TUNABLE_SET_WITH_BOUNDS (x86_rep_movsb_threshold, rep_movsb_threshold,
-                          minimum_rep_movsb_threshold, (long int) -1);
+                          minimum_rep_movsb_threshold, SIZE_MAX);
   TUNABLE_SET_WITH_BOUNDS (x86_rep_stosb_threshold, rep_stosb_threshold, 1,
-                          (long int) -1);
+                          SIZE_MAX);
 #endif
 
   cpu_features->data_cache_size = data;
This page took 0.045564 seconds and 5 git commands to generate.