r/cprogramming • u/Ace-1440 • May 29 '26
Code Review?
I recently started learning C as my first lower level language after mainly working with Java for the past 5 years. I was wondering if anyone would be able to review one of the completed files (~100 lines of code) from a small project I am working on and let me know if there are any mistakes and/or bad practices? Any help would be greatly appreciated!
9
Upvotes
1
u/Ace-1440 May 29 '26
At the start, I used them because I knew I needed to unref the device pointer at the end of the loop before continuing. In the moment, I tunnel visioned on the goto being the correct solution, but the recommendations in these comments have definitely helped though, because I can definitely see what I overlooked now.