lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 14 Sep 2022 09:46:08 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Nathan Chancellor' <nathan@...nel.org>,
        Masahiro Yamada <masahiroy@...nel.org>
CC:     "linux-kbuild@...r.kernel.org" <linux-kbuild@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>
Subject: RE: [PATCH 05/15] kbuild: build init/built-in.a just once

...
> > +VERSION=$(cat .version) 2>/dev/null &&
> > +VERSION=$(expr $VERSION + 1) 2>/dev/null ||
> > +VERSION=1

What's wrong with:
VERSION=$(($(cat .version 2>/dev/null) + 1))

If you are worried about .version not containing a valid
number and $((...)) failing then use ${VERSION:-1} later.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ