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

Re: [E-devel] [patch] fix typo in eterm/src/command.c



On Saturday, 14 October 2006, at 01:08:51 (-0400),
Mike Frysinger wrote:

> as pointed out in this warning:
> command.c:1206: warning: 'font_atom' is used uninitialized in this function
> 
> gc_atom = XInternAtom(Xdisplay, "GC", False);
> gc_atom = XInternAtom(Xdisplay, "FONT", False);
> 
> that second line is obviously wrong and should be font_atom = ...

Doh.  Good catch, thanks. :)

> in ns_wait_for_socket() it is possible to return an uninitialized
> "ret" if socket() returns failure ... so attached patch sets it to
> -1 at start ...  side node, shouldnt that tmp_sock > 0 be >= 0 ?  in
> reality it'll prob never be 0, but a value of 0 from socket() is
> certainly not an error ...

Technically no, but returning 0 would mean that stdin had been closed
and not reopened, in which case there are larger issues....  :-)

> in ns_ren_disp() it may be possible to pass an uninitialized "l" to
> the MALLOC() so attached patch sets it to 0 at start

All these are fixed, thanks.

Michael

-- 
Michael Jennings (a.k.a. KainX)  http://www.kainx.org/  <mej@kainx.org>
n + 1, Inc., http://www.nplus1.net/       Author, Eterm (www.eterm.org)
-----------------------------------------------------------------------
 "Do not meddle in the affairs of cats, for they are subtle and will
  piss on your computer."                              -- Bruce Graham