Blame SOURCES/0016-code-clean-up-for-read-3.patch

b58cad
From 37c3f3934b9d03be2d0ec70caf3779e03c003c5a Mon Sep 17 00:00:00 2001
b58cad
From: Lyonel Vincent <lyonel@ezix.org>
b58cad
Date: Mon, 25 May 2020 15:24:38 +0200
b58cad
Subject: [PATCH 16/17] code clean-up for read(3)
b58cad
b58cad
use ssize_t instead of size_t
b58cad
cf. Github PR #52
b58cad
b58cad
---
b58cad
 src/core/cpuinfo.cc | 2 +-
b58cad
 src/core/osutils.cc | 4 ++--
b58cad
 2 files changed, 3 insertions(+), 3 deletions(-)
b58cad
b58cad
diff --git a/src/core/cpuinfo.cc b/src/core/cpuinfo.cc
b58cad
index 49f3052d8da1..9e41a42184a6 100644
b58cad
--- a/src/core/cpuinfo.cc
b58cad
+++ b/src/core/cpuinfo.cc
b58cad
@@ -597,7 +597,7 @@ bool scan_cpuinfo(hwNode & n)
b58cad
   if (core)
b58cad
   {
b58cad
     char buffer[1024];
b58cad
-    size_t count;
b58cad
+    ssize_t count;
b58cad
     string cpuinfo_str = "";
b58cad
     string description = "", version = "";
b58cad
     string plat = platform();
b58cad
diff --git a/src/core/osutils.cc b/src/core/osutils.cc
b58cad
index f023a465921b..a53ed89e9d7b 100644
b58cad
--- a/src/core/osutils.cc
b58cad
+++ b/src/core/osutils.cc
b58cad
@@ -148,7 +148,7 @@ vector < string > &list)
b58cad
 {
b58cad
   char buffer[1024];
b58cad
   string buffer_str = "";
b58cad
-  size_t count = 0;
b58cad
+  ssize_t count = 0;
b58cad
   data_file fd = file_open(file);
b58cad
 
b58cad
   if (file_open_error(fd))
b58cad
@@ -174,7 +174,7 @@ const string & def)
b58cad
   if (fd >= 0)
b58cad
   {
b58cad
     char buffer[1024];
b58cad
-    size_t count = 0;
b58cad
+    ssize_t count = 0;
b58cad
 
b58cad
     memset(buffer, 0, sizeof(buffer));
b58cad
     result = "";
b58cad
-- 
b58cad
2.17.1
b58cad