<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/bin/sh/miscbltin.c, branch release/7.0.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>2008-02-24T05:45:17+00:00</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>2008-02-24T05:45:17+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a9c219fa3cec18ef9f30edec6fa106bf0e2d423d'/>
<id>a9c219fa3cec18ef9f30edec6fa106bf0e2d423d</id>
<content type='text'>
'RELENG_7_0_0_RELEASE'.

This commit was manufactured to restore the state of the 7.0-RELEASE image.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'RELENG_7_0_0_RELEASE'.

This commit was manufactured to restore the state of the 7.0-RELEASE image.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove some white space at EOL.</title>
<updated>2006-02-04T14:37:50+00:00</updated>
<author>
<name>Jens Schweikhardt</name>
<email>schweikh@FreeBSD.org</email>
</author>
<published>2006-02-04T14:37:50+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8dcaad55c28327fbd62aea12115312c4e0d6b759'/>
<id>8dcaad55c28327fbd62aea12115312c4e0d6b759</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Protect malloc, realloc and free calls with INT{ON,OFF} directly in chkalloc,</title>
<updated>2005-10-28T10:45:19+00:00</updated>
<author>
<name>Stefan Farfeleder</name>
<email>stefanf@FreeBSD.org</email>
</author>
<published>2005-10-28T10:45:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=670528cd789a9ce3d51e32edddc02e6b7ff358f9'/>
<id>670528cd789a9ce3d51e32edddc02e6b7ff358f9</id>
<content type='text'>
ckrealloc and ckfree (added), respectively.  sh jumps out of the signal handler
using longjmp which is obviously a bad idea during malloc calls.

Note: I think there is still a small race here because volatile sig_atomic_t
only guarantees atomic reads and writes while we're doing increments and
decrements.

Protect a setmode call with INT{ON,OFF} as it calls malloc internally.

PR:		45478
Patch from:	Nate Eldredge
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ckrealloc and ckfree (added), respectively.  sh jumps out of the signal handler
using longjmp which is obviously a bad idea during malloc calls.

Note: I think there is still a small race here because volatile sig_atomic_t
only guarantees atomic reads and writes while we're doing increments and
decrements.

Protect a setmode call with INT{ON,OFF} as it calls malloc internally.

PR:		45478
Patch from:	Nate Eldredge
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix the error message if the mask that is passed to umask -S contains</title>
<updated>2005-09-09T19:59:41+00:00</updated>
<author>
<name>Stefan Farfeleder</name>
<email>stefanf@FreeBSD.org</email>
</author>
<published>2005-09-09T19:59:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e4c880af3f112d682fe5b0ac5517521f48cdfc33'/>
<id>e4c880af3f112d682fe5b0ac5517521f48cdfc33</id>
<content type='text'>
non-digits.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
non-digits.
</pre>
</div>
</content>
</entry>
<entry>
<title>Various small code cleanups resulting from a code reviewing</title>
<updated>2005-09-06T19:30:00+00:00</updated>
<author>
<name>Ralf S. Engelschall</name>
<email>rse@FreeBSD.org</email>
</author>
<published>2005-09-06T19:30:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f7d95a075cf0e24e248f989b09f456a943a42035'/>
<id>f7d95a075cf0e24e248f989b09f456a943a42035</id>
<content type='text'>
and linting procedure:

1. Remove useless sub-expression:

   - if (*start || (!ifsspc &amp;&amp; start &gt; string &amp;&amp; (nulonly || 1))) {
   + if (*start || (!ifsspc &amp;&amp; start &gt; string)) {

   The sub-expression "(nulonly || 1)" always evaluates to true and
   according to CVS logs seems to be just a left-over from some
   debugging and introduced by accident. Removing the sub-expression
   doesn't change semantics and a code inspection showed that the
   variable "nulonly" is also not necessary here in any way (and the
   expression would require fixing instead of removing).

2. Remove dead code:

   -                if (backslash &amp;&amp; c == '\\') {
   -                        if (read(STDIN_FILENO, &amp;c, 1) != 1) {
   -                                status = 1;
   -                                break;
   -                        }
   -                        STPUTC(c, p);
   -                } else if (ap[1] != NULL &amp;&amp; strchr(ifs, c) != NULL) {
   +                if (ap[1] != NULL &amp;&amp; strchr(ifs, c) != NULL) {

   Inspection of the control and data flow showed that variable
   "backslash" is always false (0) when the "if"-expression is
   evaluated, hence the whole block is effectively dead code.
   Additionally, the skipping of characters after a backslash is already
   performed correctly a few lines above, so this code is also not
   needed at all. According to the CVS logs and the ASH 0.2 sources,
   this code existed in this way already since its early days.

3. Cleanup Style:

   - ! trap[signo][0] == '\0' &amp;&amp;
   + ! (trap[signo][0] == '\0') &amp;&amp;

   The expression wants to ensure the trap is not assigned the empty
   string. But the "!" operator has higher precedence than "==", so the
   comparison should be put into parenthesis to form the intended way of
   expression. Nevertheless the code was effectively not really broken
   as both particular NUL comparisons are semantically equal, of course.
   But the parenthesized version is a lot more intuitive.

4. Remove shadowing variable declaration:

   - char *q;

   The declaration of symbol "q" hides another identical declaration of
   "q" in the same context. As the other "q" is already reused multiple
   times and also can be reused again without negative side-effects,
   just remove the shadowing declaration.

5. Just small cosmetics:

   - if (ifsset() != 0)
   + if (ifsset())

   The ifsset() macro is already coded by returning the boolean result
   of a comparison operator, so no need to compare this boolean result
   again against a numerical value. This also aligns the macros usage to
   the remaining existing code.

Reviewed by: stefanf@
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and linting procedure:

1. Remove useless sub-expression:

   - if (*start || (!ifsspc &amp;&amp; start &gt; string &amp;&amp; (nulonly || 1))) {
   + if (*start || (!ifsspc &amp;&amp; start &gt; string)) {

   The sub-expression "(nulonly || 1)" always evaluates to true and
   according to CVS logs seems to be just a left-over from some
   debugging and introduced by accident. Removing the sub-expression
   doesn't change semantics and a code inspection showed that the
   variable "nulonly" is also not necessary here in any way (and the
   expression would require fixing instead of removing).

2. Remove dead code:

   -                if (backslash &amp;&amp; c == '\\') {
   -                        if (read(STDIN_FILENO, &amp;c, 1) != 1) {
   -                                status = 1;
   -                                break;
   -                        }
   -                        STPUTC(c, p);
   -                } else if (ap[1] != NULL &amp;&amp; strchr(ifs, c) != NULL) {
   +                if (ap[1] != NULL &amp;&amp; strchr(ifs, c) != NULL) {

   Inspection of the control and data flow showed that variable
   "backslash" is always false (0) when the "if"-expression is
   evaluated, hence the whole block is effectively dead code.
   Additionally, the skipping of characters after a backslash is already
   performed correctly a few lines above, so this code is also not
   needed at all. According to the CVS logs and the ASH 0.2 sources,
   this code existed in this way already since its early days.

3. Cleanup Style:

   - ! trap[signo][0] == '\0' &amp;&amp;
   + ! (trap[signo][0] == '\0') &amp;&amp;

   The expression wants to ensure the trap is not assigned the empty
   string. But the "!" operator has higher precedence than "==", so the
   comparison should be put into parenthesis to form the intended way of
   expression. Nevertheless the code was effectively not really broken
   as both particular NUL comparisons are semantically equal, of course.
   But the parenthesized version is a lot more intuitive.

4. Remove shadowing variable declaration:

   - char *q;

   The declaration of symbol "q" hides another identical declaration of
   "q" in the same context. As the other "q" is already reused multiple
   times and also can be reused again without negative side-effects,
   just remove the shadowing declaration.

5. Just small cosmetics:

   - if (ifsset() != 0)
   + if (ifsset())

   The ifsset() macro is already coded by returning the boolean result
   of a comparison operator, so no need to compare this boolean result
   again against a numerical value. This also aligns the macros usage to
   the remaining existing code.

Reviewed by: stefanf@
</pre>
</div>
</content>
</entry>
<entry>
<title>First declare the functions to pacify -Wmissing-prototypes.</title>
<updated>2005-08-13T08:31:37+00:00</updated>
<author>
<name>Stefan Farfeleder</name>
<email>stefanf@FreeBSD.org</email>
</author>
<published>2005-08-13T08:31:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=79ea0bd9f36b1a60c021923258780935682137b1'/>
<id>79ea0bd9f36b1a60c021923258780935682137b1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove clause 3 from the UCB licenses.</title>
<updated>2004-04-06T20:06:54+00:00</updated>
<author>
<name>Mark Murray</name>
<email>markm@FreeBSD.org</email>
</author>
<published>2004-04-06T20:06:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6195fb4102afbdfc3da8c0ac2e4cacb0f37d89a9'/>
<id>6195fb4102afbdfc3da8c0ac2e4cacb0f37d89a9</id>
<content type='text'>
OK'ed by:	imp, core
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OK'ed by:	imp, core
</pre>
</div>
</content>
</entry>
<entry>
<title>- Don't use quad_t when we really mean rlim_t.</title>
<updated>2002-10-01T11:44:38+00:00</updated>
<author>
<name>Maxime Henrion</name>
<email>mux@FreeBSD.org</email>
</author>
<published>2002-10-01T11:44:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0c1661b754558c9017e31b862e4b4c01e7f1cb1f'/>
<id>0c1661b754558c9017e31b862e4b4c01e7f1cb1f</id>
<content type='text'>
- Cast rlim_t to intmax_t when printing it.

This should fix the last format errors in sh(1).

Tested on:	i386, sparc64
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Cast rlim_t to intmax_t when printing it.

This should fix the last format errors in sh(1).

Tested on:	i386, sparc64
</pre>
</div>
</content>
</entry>
<entry>
<title>Callers of error() don't need to supply a program name prefix in the</title>
<updated>2002-09-30T13:29:32+00:00</updated>
<author>
<name>Tim J. Robbins</name>
<email>tjr@FreeBSD.org</email>
</author>
<published>2002-09-30T13:29:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=abe2dc6158ee75cfe9236fd9460aea4afac52bd0'/>
<id>abe2dc6158ee75cfe9236fd9460aea4afac52bd0</id>
<content type='text'>
error message. Stops ulimit giving error messages like "ulimit: ulimit: xyz".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
error message. Stops ulimit giving error messages like "ulimit: ulimit: xyz".
</pre>
</div>
</content>
</entry>
<entry>
<title>Consistently use FBSDID</title>
<updated>2002-06-30T05:15:05+00:00</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2002-06-30T05:15:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2749b1412921cacde0110606121acb7a5e1e2b62'/>
<id>2749b1412921cacde0110606121acb7a5e1e2b62</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
