coreutils

General Software Utilities
git clone http://git.omkov.net/coreutils
Log | Tree | Refs | README | LICENCE | Download

AuthorJamozed <[email protected]>
Date2020-07-09 10:14:59
Commitf45f8cb3db6291c50aa273bd96ed9b41deb8bbc5
Parentd8671c354dd4484aee924fe9a28255b71a249450

sleep: Fix implicit conversion warning

Diffstat

M src/sleep.c | 8 ++++----

1 files changed, 4 insertions, 4 deletions

diff --git a/src/sleep.c b/src/sleep.c
index fff098a..c92135e 100644
--- a/src/sleep.c
+++ b/src/sleep.c
@@ -1,4 +1,4 @@
-// sleep.c, version 1.0.1
+// sleep.c, version 1.0.2
 // OMKOV coreutils implementation of POSIX sleep
 // Copyright (C) 2020, Jakob Wakeling
 // All rights reserved.
@@ -42,7 +42,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
 #include <stdio.h>
 #include <stdint.h>
 
-#define VERSION "1.0.1"
+#define VERSION "1.0.2"
 
 static void help(void);
 static void version(void);
@@ -63,9 +63,9 @@ int main(int ac, char *av[]) { A0 = av[0];
 
 	if (opt.ind == ac) { error(1, "missing operand"); }
 
-	register uintmax_t n = 0, d; register char *p = av[1];
+	register unsigned n = 0, d; register char *p = av[1];
 	for (; *p >= '0' && *p <= '9'; ++p) {
-		d = (uintmax_t)*p - '0';
+		d = (unsigned)*p - '0';
 		if (n > (UINTMAX_MAX - d) / 10) { break; }
 		n = n * 10 + d;
 	}