[hackers] [sbase] Fix type mismatch in split(1) || sin

From: <git_AT_suckless.org>
Date: Thu, 26 Nov 2015 11:35:52 +0100 (CET)

commit bb7427f6c1c95fc6b02ee90ca124dff50fcff9c5
Author: sin <sin_AT_2f30.org>
AuthorDate: Thu Nov 26 10:32:46 2015 +0000
Commit: sin <sin_AT_2f30.org>
CommitDate: Thu Nov 26 10:35:46 2015 +0000

    Fix type mismatch in split(1)
    
    Adapted from a patch sent by Random832.

diff --git a/split.c b/split.c
index f15e925..7033a28 100644
--- a/split.c
+++ b/split.c
_AT_@ -48,7 +48,7 @@ int
 main(int argc, char *argv[])
 {
         FILE *in = stdin, *out = NULL;
- size_t size = 1000, n;
+ off_t size = 1000, n;
         int ret = 0, ch, plen, slen = 2, always = 0;
         char name[NAME_MAX + 1], *prefix = "x", *file = NULL;
 
_AT_@ -69,7 +69,7 @@ main(int argc, char *argv[])
                 break;
         case 'l':
                 always = 0;
- size = estrtonum(EARGF(usage()), 1, MIN(LLONG_MAX, SIZE_MAX));
+ size = estrtonum(EARGF(usage()), 1, MIN(LLONG_MAX, SSIZE_MAX));
                 break;
         default:
                 usage();
Received on Thu Nov 26 2015 - 11:35:52 CET

This archive was generated by hypermail 2.3.0 : Thu Nov 26 2015 - 11:36:18 CET