[gpm] Check return codes everywhere
Nico Schottelius
nico-gpm@schottelius.org
Sat Jan 3 16:46:05 CET 2009
Hello Markus!
Markus Elfring [Sun, Dec 28, 2008 at 05:44:17PM +0100]:
> [...]
> Some checks for return codes are missing.
> [...]
There are more than just some :-)
But yes, in general everything that could result in an error
should be caught.
If you are willing to add the code, please
a) do fixes against gpm-2-dev and
b) use gpm_report with the correct error level for reporting
> Would you like to add more error handling for return values from
> "strdup" like in the function "parse_argv" and from "fprintf" in the
> function "check_uniqueness"?
> http://unix.schottelius.org/cgi-bin/gitweb.cgi?p=gpm;a=blob;f=src/mice.c;h=dacee3474f30919292a1cc22a1468e993bc61a38;hb=HEAD#l157
> http://unix.schottelius.org/cgi-bin/gitweb.cgi?p=gpm;a=blob;f=src/daemon/check_uniqueness.c;h=4972413f6706bd491453ea862eae4c60af09ed32;hb=HEAD#l47
>
Why not? This should catch ENOMEM in both cases.
Sincerly,
Nico
--
Think about Free and Open Source Software (FOSS).
http://nico.schottelius.org/documentations/foss/the-term-foss/
PGP: BFE4 C736 ABE5 406F 8F42 F7CF B8BE F92A 9885 188C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.linux.it/pipermail/gpm/attachments/20090103/f6eb39b6/attachment.pgp>
More information about the gpm
mailing list