From: krw Date: Thu, 2 Aug 2018 16:30:01 +0000 (+0000) Subject: errno is never checked after a call to getuint64(). So there is no X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=94f1563961ff007ad087a09bd2598d68ed95a620;p=openbsd errno is never checked after a call to getuint64(). So there is no point to getuint64() setting it to EINVAL when the user enters an invalid value or aborts input with a ^D. --- diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index af28cbc74eb..a9c2686d0d6 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.340 2018/07/12 16:59:59 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.341 2018/08/02 16:30:01 krw Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller @@ -1228,7 +1228,6 @@ getuint64(struct disklabel *lp, char *prompt, char *helpstring, return (rval); invalid: - errno = EINVAL; fputs("Invalid entry\n", stderr); return (CMD_BADVALUE); }