Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 10570a2

Browse files
Handle edge case
1 parent 0e8ffca commit 10570a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎1-insertion_sort_list.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ void insertion_sort_list(listint_t **list)
1212
{
1313
listint_t *current = NULL, *holder = NULL;
1414

15+
if (!list)
16+
return;
17+
if (*list == NULL)
18+
return;
1519
if ((*list)->next == NULL)
1620
return;
1721

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /