diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-10-19 09:37:08 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-10-24 05:03:00 +0900 |
commit | fd5ad16cfba6ba9c607480efb428aa97dc2b875a (patch) | |
tree | 4660a4b55be1de20d405a2bbb78197b0308fee50 /src/reply-password/reply-password.c | |
parent | ec9d636b370c5872f32b57ecfbb0d6b41a840902 (diff) | |
download | systemd-fd5ad16cfba6ba9c607480efb428aa97dc2b875a.tar.gz |
reply-password: initialize 'length' variable
Follow-up for 1fd2786161feba4276a81c3468cfbfb118f56517.
This fixes the following warning when built by clang:
```
../src/reply-password/reply-password.c:76:21 warning: variable 'length' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
```
Fixes CID#1396281 and CID#1396277.
Diffstat (limited to 'src/reply-password/reply-password.c')
-rw-r--r-- | src/reply-password/reply-password.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reply-password/reply-password.c b/src/reply-password/reply-password.c index 5794dfd535..d085da9f08 100644 --- a/src/reply-password/reply-password.c +++ b/src/reply-password/reply-password.c @@ -37,7 +37,7 @@ static int send_on_socket(int fd, const char *socket_name, const void *packet, s int main(int argc, char *argv[]) { _cleanup_free_ char *packet = NULL; _cleanup_close_ int fd = -1; - size_t length; + size_t length = 0; int r; log_set_target(LOG_TARGET_AUTO); |