Module Name: src Committed By: christos Date: Thu Feb 5 16:01:38 UTC 2015
Modified Files: src/lib/libc/stdlib: strtonum.c Log Message: cast to return type To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/stdlib/strtonum.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/stdlib/strtonum.c diff -u src/lib/libc/stdlib/strtonum.c:1.2 src/lib/libc/stdlib/strtonum.c:1.3 --- src/lib/libc/stdlib/strtonum.c:1.2 Sun Jan 18 13:01:41 2015 +++ src/lib/libc/stdlib/strtonum.c Thu Feb 5 11:01:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: strtonum.c,v 1.2 2015/01/18 18:01:41 christos Exp $ */ +/* $NetBSD: strtonum.c,v 1.3 2015/02/05 16:01:38 christos Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. * All rights reserved. @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: strtonum.c,v 1.2 2015/01/18 18:01:41 christos Exp $"); +__RCSID("$NetBSD: strtonum.c,v 1.3 2015/02/05 16:01:38 christos Exp $"); #define _OPENBSD_SOURCE #include <stdio.h> @@ -48,7 +48,7 @@ strtonum(const char *nptr, long long min if (errstr == NULL) errstr = &resp; - rv = strtoi(nptr, NULL, 0, minval, maxval, &e); + rv = (long long)strtoi(nptr, NULL, 0, minval, maxval, &e); if (e == 0) { *errstr = NULL;