]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r278297:
authordim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 9 Feb 2015 07:52:45 +0000 (07:52 +0000)
committerdim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 9 Feb 2015 07:52:45 +0000 (07:52 +0000)
commit7dccd0f06a9aa6eae5a8ec269d17ced180513aa3
treefab28c380956d985f421d5700e73b04ed098ef35
parentf67ebcf88411aa64212d558b543f6710b3173b93
MFC r278297:

Fix two clang 3.6.0 warnings in usr.sbin/syslogd:

usr.sbin/syslogd/syslogd.c:1023:10: error: address of array 'f->f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
    f->f_prevline && !strcmp(msg, f->f_prevline) &&
    ~~~^~~~~~~~~~
usr.sbin/syslogd/syslogd.c:1178:16: error: address of array 'f->f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
} else if (f->f_prevline) {
       ~~  ~~~^~~~~~~~~~

In both cases, the f_prevline field of struct filed is a char array, so
it can never be null.  Remove the checks.

Reviewed by: jilles
Differential Revision: https://reviews.freebsd.org/D1716

git-svn-id: svn://svn.freebsd.org/base/stable/10@278437 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.sbin/syslogd/syslogd.c