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

delete minor unreachable code caused by t.Fatal #1047

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Abirdcfly
Copy link

Signed-off-by: Abirdcfly fp544037857@gmail.com

Signed-off-by: Abirdcfly <fp544037857@gmail.com>
@@ -237,7 +237,6 @@ func TestDefragMaxSize(t *testing.T) {

_, err := defrag.DefragIPv4(&ip2)
if err != nil {
t.Fatal(err)
t.Fatalf("defrag: Maximum length is supposed to be 65535")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be good for debugging if the error were still printed, that can be done either by changing the removed Fatal to Error instead of removing or by adding the error to the next Fatalf.

@@ -237,7 +237,6 @@ func TestDefragMaxSize(t *testing.T) {

_, err := defrag.DefragIPv4(&ip2)
if err != nil {
t.Fatal(err)
t.Fatalf("defrag: Maximum length is supposed to be 65535")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Fatalf could be Fatal since it doesn't format anything

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.

2 participants