OLIMEX / DIY-LAPTOP

Do It Yourself Open Source Hardware and Software Modular Hacker's Friendly Laptop
Apache License 2.0
495 stars 89 forks source link

teres1-ledctrl: check for more possible errors #13

Closed khumarahn closed 6 years ago

khumarahn commented 6 years ago

Hi,

I took a look at the code of teres1-ledctrl, added some error checks. And string.h for strlen.

I found that read() can return nonzero on error, one has to check for positive return.