[openssh-commits] [openssh] 07/14: upstream: can shortcut by returning strtonum() value directly; ok
git+noreply at mindrot.org
git+noreply at mindrot.org
Tue Apr 30 12:39:44 AEST 2024
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 8176e1a6c2e6da9361a7abb6fbf6c23c299f495b
Author: deraadt at openbsd.org <deraadt at openbsd.org>
AuthorDate: Tue Apr 2 09:56:58 2024 +0000
upstream: can shortcut by returning strtonum() value directly; ok
djm
OpenBSD-Commit-ID: 7bb2dd3d6d1f288dac14247d1de446e3d7ba8b8e
---
misc.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/misc.c b/misc.c
index a4ae95c9..fe6c4a51 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.191 2024/04/02 09:52:14 deraadt Exp $ */
+/* $OpenBSD: misc.c,v 1.192 2024/04/02 09:56:58 deraadt Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2005-2020 Damien Miller. All rights reserved.
@@ -2428,13 +2428,10 @@ const char *
atoi_err(const char *nptr, int *val)
{
const char *errstr = NULL;
- long long num;
if (nptr == NULL || *nptr == '\0')
return "missing";
- num = strtonum(nptr, 0, INT_MAX, &errstr);
- if (errstr == NULL)
- *val = (int)num;
+ *val = strtonum(nptr, 0, INT_MAX, &errstr);
return errstr;
}
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list