Re: Check return codes everywhere

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: Digital signature

_______________________________________________
gpm mailing list
gpm@xxxxxxxxxxxxxx
http://lists.linux.it/listinfo/gpm

[Index of Archives]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Gimp]     [Yosemite News]