summaryrefslogtreecommitdiffstats
path: root/bin/cat
diff options
context:
space:
mode:
authorsbruno <sbruno@FreeBSD.org>2015-10-04 01:56:11 +0000
committersbruno <sbruno@FreeBSD.org>2015-10-04 01:56:11 +0000
commit14a0f4f2edd4cc7de109a6b4396a8fac75924199 (patch)
treeaaa707478a7f488d332fec1c6707faca76496abd /bin/cat
parent74bf082d077570c7b31a7bd0ff3c22d5c6b7565e (diff)
downloadFreeBSD-src-14a0f4f2edd4cc7de109a6b4396a8fac75924199.zip
FreeBSD-src-14a0f4f2edd4cc7de109a6b4396a8fac75924199.tar.gz
Initialize fd to -1 so that gcc doesn't emit an unitialized warning.
Diffstat (limited to 'bin/cat')
-rw-r--r--bin/cat/cat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/cat/cat.c b/bin/cat/cat.c
index e7d3864..b5f99ee 100644
--- a/bin/cat/cat.c
+++ b/bin/cat/cat.c
@@ -306,7 +306,8 @@ udom_open(const char *path, int flags)
{
struct addrinfo hints, *res, *res0;
char rpath[PATH_MAX];
- int fd, error;
+ int fd = -1;
+ int error;
/*
* Construct the unix domain socket address and attempt to connect.
OpenPOWER on IntegriCloud