<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/random, branch stable/14</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>Remove $FreeBSD$: one-line nroff pattern</title>
<updated>2023-08-16T17:55:15+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b2c76c41be32f904179efed29c0ca04d53f3996c'/>
<id>b2c76c41be32f904179efed29c0ca04d53f3996c</id>
<content type='text'>
Remove /^\.\\"\s*\$FreeBSD\$$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\.\\"\s*\$FreeBSD\$$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-16T17:55:03+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf'/>
<id>d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-16T17:54:42+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1d386b48a555f61cb7325543adbbb5c3f3407a66'/>
<id>1d386b48a555f61cb7325543adbbb5c3f3407a66</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-16T17:54:16+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:16+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b3e7694832e81d7a904a10f525f8797b753bf0d3'/>
<id>b3e7694832e81d7a904a10f525f8797b753bf0d3</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>Mark usage function as __dead2 in programs where it does not return</title>
<updated>2023-07-07T16:45:18+00:00</updated>
<author>
<name>Alfonso Gregory</name>
<email>gfunni234@gmail.com</email>
</author>
<published>2023-07-07T16:39:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1a7ac2bd24c1763b0d32e23d9c70308fbc24b07a'/>
<id>1a7ac2bd24c1763b0d32e23d9c70308fbc24b07a</id>
<content type='text'>
In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735
</pre>
</div>
</content>
</entry>
<entry>
<title>random(6): Re-add undocumented support for floating point denominators</title>
<updated>2020-02-15T19:13:37+00:00</updated>
<author>
<name>Conrad Meyer</name>
<email>cem@FreeBSD.org</email>
</author>
<published>2020-02-15T19:13:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=06257a71aa94cef6d4682a74d616cd427146ee92'/>
<id>06257a71aa94cef6d4682a74d616cd427146ee92</id>
<content type='text'>
And document it in the manual page.

PR:		244139
Submitted by:	Keith White &lt;kwhite AT site.uottawa.ca&gt; (earlier version)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And document it in the manual page.

PR:		244139
Submitted by:	Keith White &lt;kwhite AT site.uottawa.ca&gt; (earlier version)
</pre>
</div>
</content>
</entry>
<entry>
<title>random(6): Fix off-by-one</title>
<updated>2020-01-16T21:38:44+00:00</updated>
<author>
<name>Conrad Meyer</name>
<email>cem@FreeBSD.org</email>
</author>
<published>2020-01-16T21:38:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=92f7ba208c63b09aa8b077761a6734ccde7efda7'/>
<id>92f7ba208c63b09aa8b077761a6734ccde7efda7</id>
<content type='text'>
After r355693, random(6) -f sometimes fail to output all the lines of the
input file.  This is because the range from which random indices are chosen
is too big, so occasionally the random selection doesn't correspond to any
line and nothing gets printed.

(Ed. note: Mea culpa.  Working on r355693, I was confused by the sometime
use of 1-indexing, sometimes 0-indexing in randomize_fd().)

Submitted by:	Ryan Moeller &lt;ryan AT freqlabs.com&gt;
X-MFC-With:	r355693
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D23199
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After r355693, random(6) -f sometimes fail to output all the lines of the
input file.  This is because the range from which random indices are chosen
is too big, so occasionally the random selection doesn't correspond to any
line and nothing gets printed.

(Ed. note: Mea culpa.  Working on r355693, I was confused by the sometime
use of 1-indexing, sometimes 0-indexing in randomize_fd().)

Submitted by:	Ryan Moeller &lt;ryan AT freqlabs.com&gt;
X-MFC-With:	r355693
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D23199
</pre>
</div>
</content>
</entry>
<entry>
<title>random(6): produce random results</title>
<updated>2019-12-13T04:37:39+00:00</updated>
<author>
<name>Conrad Meyer</name>
<email>cem@FreeBSD.org</email>
</author>
<published>2019-12-13T04:37:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c7b8411cc9e09b1a9879a0bca6a39b55de7247d8'/>
<id>c7b8411cc9e09b1a9879a0bca6a39b55de7247d8</id>
<content type='text'>
This program is trash and there's no reason to keep it in base.  But as long as
we're shipping a silly program named 'random', let's actually make it random.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This program is trash and there's no reason to keep it in base.  But as long as
we're shipping a silly program named 'random', let's actually make it random.
</pre>
</div>
</content>
</entry>
<entry>
<title>DIRDEPS_BUILD: Update dependencies.</title>
<updated>2017-10-31T00:07:04+00:00</updated>
<author>
<name>Bryan Drewery</name>
<email>bdrewery@FreeBSD.org</email>
</author>
<published>2017-10-31T00:07:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ea825d02749f382c3f7e17f28247f20a48733eab'/>
<id>ea825d02749f382c3f7e17f28247f20a48733eab</id>
<content type='text'>
Sponsored by:	Dell EMC Isilon
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sponsored by:	Dell EMC Isilon
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a (false positive?) Argument cannot be negative coverity defect.</title>
<updated>2016-06-08T02:14:05+00:00</updated>
<author>
<name>Don Lewis</name>
<email>truckman@FreeBSD.org</email>
</author>
<published>2016-06-08T02:14:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=290dadbd560601bc99dd1b6e721d3c2a3c0d329a'/>
<id>290dadbd560601bc99dd1b6e721d3c2a3c0d329a</id>
<content type='text'>
Rather than guarding close(fd) with an fd &gt;= 0 test and setting fd
to -1 when it is closed to avoid a potential double-close, just
move the close() call after the conditional "goto make_token".  This
moves the close() call totally outside the loop to avoid the
possibility of calling it twice.  This should also prevent a Coverity
warning about checking fd for validity after it was previously passed
to read().

Reported by:	Coverity
CID:		1355335
MFC after:	1 week
X-MFC with:	r299484
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rather than guarding close(fd) with an fd &gt;= 0 test and setting fd
to -1 when it is closed to avoid a potential double-close, just
move the close() call after the conditional "goto make_token".  This
moves the close() call totally outside the loop to avoid the
possibility of calling it twice.  This should also prevent a Coverity
warning about checking fd for validity after it was previously passed
to read().

Reported by:	Coverity
CID:		1355335
MFC after:	1 week
X-MFC with:	r299484
</pre>
</div>
</content>
</entry>
</feed>
