diff options
author | marcel <marcel@FreeBSD.org> | 1999-09-28 13:24:13 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 1999-09-28 13:24:13 +0000 |
commit | 2c960407e2b84c3c61c7574c0835bd445b348ed7 (patch) | |
tree | 2ece477fc4ab63bf38c10fd2f848956a1316b2f9 /lib/libc | |
parent | 3b30ad42290fed0d41cbf8a0bc84c8f9aa949861 (diff) | |
download | FreeBSD-src-2c960407e2b84c3c61c7574c0835bd445b348ed7.zip FreeBSD-src-2c960407e2b84c3c61c7574c0835bd445b348ed7.tar.gz |
Explicitly use sigemptyset to clear a sigset_t. Explicit
initialization of sa_flags allows us to lose the bzero.
$FreeBSD$ tag added.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/getcwd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/gen/getcwd.c b/lib/libc/gen/getcwd.c index 8d57e6c..9b1ccf3 100644 --- a/lib/libc/gen/getcwd.c +++ b/lib/libc/gen/getcwd.c @@ -29,6 +29,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #if defined(LIBC_SCCS) && !defined(lint) @@ -101,7 +103,8 @@ getcwd(pt, size) int ret; if (have__getcwd == 1) { /* unsure? */ - bzero(&sa, sizeof(sa)); + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; sa.sa_handler = SIG_IGN; if (sigaction(SIGSYS, &sa, &osa) >= 0) sigsys_installed = 1; |