Skip to content
This repository has been archived by the owner on Oct 21, 2021. It is now read-only.

Code cleanup #6

Closed
wants to merge 13 commits into from
Closed

Code cleanup #6

wants to merge 13 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 11, 2015

clean up daisho a bit so code is slightly more readable. Compile-tested only due to lack of HW.

This patch changes indentation all over the source
code so it's more consistent and also removes some
unnecessary else statements in order to decrease
indentation level where unnecessary.

Signed-off-by: Felipe Balbi <balbi@kernel.org>
source exits early if 'dev' can't be found, so
by the time we reach libusb_close(), we're sure
dev is valid pointer.

Signed-off-by: Felipe Balbi <balbi@kernel.org>
All other error cases, return -1, so fix this one
case where it's returning 1 instead.

Signed-off-by: Felipe Balbi <balbi@kernel.org>
fix indentation and spaces around the source code.

Signed-off-by: Felipe Balbi <balbi@kernel.org>
This just helps with readability, no functional
changes.

while at that, also add a blank line between
declarations and code, also remove a blank line
before close-curly-brackets.

Signed-off-by: Felipe Balbi <balbi@kernel.org>
If we do a pre-increment, we will never
look at device 0, only 1 and all others.

By doing a post-increment, we will also look
at device 0.

Signed-off-by: Felipe Balbi <balbi@kernel.org>
cleanup only, no functional changes.

Signed-off-by: Felipe Balbi <balbi@kernel.org>
indentation, white spaces, and the like.

Signed-off-by: Felipe Balbi <balbi@kernel.org>
indentation, whitespaces, and the like.

Signed-off-by: Felipe Balbi <balbi@kernel.org>
they're not needed and we can decrease indentation
with this.

Signed-off-by: Felipe Balbi <balbi@kernel.org>
dev is always valid when that call happens.

Signed-off-by: Felipe Balbi <balbi@kernel.org>
return -1 instead of 1.

Signed-off-by: Felipe Balbi <balbi@kernel.org>
return is not a function, so remove () around its
return value, return negative value on error, indentation.

Signed-off-by: Felipe Balbi <balbi@kernel.org>
@mossmann
Copy link
Member

Thank you for your contribution, but we haven't looked at Daisho in quite a while. I'm closing this PR and archiving the repo.

@mossmann mossmann closed this Oct 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants