Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong checks for username #146

Merged
merged 3 commits into from Mar 7, 2015
Merged

Fix wrong checks for username #146

merged 3 commits into from Mar 7, 2015

Conversation

stweil
Copy link
Contributor

@stweil stweil commented Mar 7, 2015

Only the 2nd patch is relevant for the bug fix, but of course all three patches may be pulled.

The first patch removes trailing blanks and was needed before further code modifications because my editor removes those blanks by default.

The 3rd patch was added to get a clean git status.

Regards
Stefan

The files touched here need a bug fix which is applied with the
following patch.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
The variable user in struct iscsi_url is a character array, not a pointer.
Therefore its address will never be NULL.

When libscsi is built using clang instead of gcc, those errors are reported:

iscsi-perf.c:256:17: error:
 comparison of array 'iscsi_url->user' not equal to a null
 pointer is always true [-Werror,-Wtautological-pointer-compare]
iscsi-dd.c:272:17: error:
 comparison of array 'iscsi_url->user' not equal to a null
 pointer is always true [-Werror,-Wtautological-pointer-compare]
iscsi-dd.c:331:17: error:
 comparison of array 'iscsi_url->user' not equal to a null
 pointer is always true [-Werror,-Wtautological-pointer-compare]
ld_iscsi.c:99:18: error:
 comparison of array 'iscsi_url->user' not equal to a null
 pointer is always true [-Werror,-Wtautological-pointer-compare]

Fix those errors and also similar code patterns in aros/iscsi-ls.c and
test-tool/iscsi-support.c.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
When building on a host with installed libtool, some files are generated
which should be ignored by git:

	examples/iscsi-dd
	examples/iscsiclient
	examples/ld_iscsi.so
	utils/iscsi-inq
	utils/iscsi-ls
	utils/iscsi-perf
	utils/iscsi-readcapacity16
	utils/iscsi-swp

Signed-off-by: Stefan Weil <sw@weilnetz.de>
sahlberg added a commit that referenced this pull request Mar 7, 2015
Fix wrong checks for username
@sahlberg sahlberg merged commit b03959d into sahlberg:master Mar 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants