bug-cpio
[Top][All Lists]
Advanced

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

[Bug-cpio] [PATCH 1/2] Use ssize_t for input buffer size


From: Pavel Raiskup
Subject: [Bug-cpio] [PATCH 1/2] Use ssize_t for input buffer size
Date: Mon, 23 Sep 2013 17:31:46 +0200

Bug report: https://bugzilla.redhat.com/show_bug.cgi?id=996150

* src/global.c: Use ssize_t rather than size_t for input_size.
* src/extern.h: Likewise.
---
 src/extern.h | 3 ++-
 src/global.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/extern.h b/src/extern.h
index ef00242..1e7193e 100644
--- a/src/extern.h
+++ b/src/extern.h
@@ -83,7 +83,8 @@ extern int debug_flag;
 extern char *input_buffer, *output_buffer;
 extern char *in_buff, *out_buff;
 extern size_t input_buffer_size;
-extern size_t input_size, output_size;
+extern ssize_t input_size;
+extern size_t output_size;
 extern off_t input_bytes, output_bytes;
 
 extern char *directory_name;
diff --git a/src/global.c b/src/global.c
index e08e188..a08006e 100644
--- a/src/global.c
+++ b/src/global.c
@@ -156,7 +156,8 @@ size_t input_buffer_size;
 char *in_buff, *out_buff;
 
 /* Current number of bytes stored at `input_buff' and `output_buff'.  */
-size_t input_size, output_size;
+ssize_t input_size;
+size_t output_size;
 
 off_t input_bytes, output_bytes;
 
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]