Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
William Sha
ai01_tp1
Commits
5fbabcef
Commit
5fbabcef
authored
Nov 20, 2017
by
William Sha
Browse files
Minor fix for initialize in insert
parent
482aad3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
tp3.c
View file @
5fbabcef
...
...
@@ -75,7 +75,8 @@ void insert_beginning_list(List** list, char* str){
return
;
}
List
*
tempList
=
malloc
(
sizeof
(
List
));
List
*
tempList
;
initialize
(
&
tempList
);
insert_empty_list
(
&
tempList
,
str
);
tempList
->
tail
->
next
=
(
*
list
)
->
head
;
(
*
list
)
->
head
=
tempList
->
head
;
...
...
@@ -91,7 +92,8 @@ void insert_end_list(List** list, char* str){
return
;
}
List
*
tempList
=
malloc
(
sizeof
(
List
));
List
*
tempList
;
initialize
(
&
tempList
);
insert_empty_list
(
&
tempList
,
str
);
(
*
list
)
->
tail
->
next
=
tempList
->
head
;
(
*
list
)
->
tail
=
tempList
->
tail
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment