Open elfring opened 6 years ago
For strdup, yes. For printf... why?
I suggest to avoid ignorance of return values a bit more.
Fixed for strdup in grokdir, commit c671a2b.
Dealing with printf seems rather more complicated, as it returns a positive number of bytes read even when output is redirected to /dev/full. I don't know how to get printf to return an error when stdout is full.
Can you get any further software development ideas from the following command example?
elfring@Sonne:~> LANG=C echo X > /dev/full
bash: echo: write error: No space left on device
Would you like to add more error handling for return values from functions like the following?