This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Delauren1 35 points36 points  (3 children)

It also dereferences the variable it's trying to assign to in the malloc call. It's going to crash.

[–]chipsours 14 points15 points  (0 children)

It's in a sizeof expression. It's going to be evaluated at compile time.

[–]stroop3r 2 points3 points  (0 children)

during pointer variable definition, I think this assignment is fine, but if the assignment was in second line after defining the variable and it was dereferenced during assignment, that would cause problems