Skip to content

delete minor unreachable code caused by t.Fatal#1047

Open
Abirdcfly wants to merge 1 commit intogoogle:masterfrom
Abirdcfly:patch-1
Open

delete minor unreachable code caused by t.Fatal#1047
Abirdcfly wants to merge 1 commit intogoogle:masterfrom
Abirdcfly:patch-1

Conversation

@Abirdcfly
Copy link

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

Signed-off-by: Abirdcfly <fp544037857@gmail.com>
_, 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.

_, 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