rsync-2.5.1 / socket.c - unititialized variable breaks build.
Dave Dykstra
dwd at bell-labs.com
Wed Jan 16 04:12:54 EST 2002
It looks like Martin just put this fix into CVS because he turned on -Wall
on gcc and noticed a warning message.
- Dave Dykstra
On Mon, Jan 07, 2002 at 09:34:27PM -0600, John Malmberg wrote:
> Probably, but that just means that there was an addtional bug in the
> original code.
>
> At this phase, I am just trying to get rid of the compiler diagnostics
> with out changing what the code is intending on doing.
>
> Right now I am trying to make sense of what "char" declarations should
> really be "unsigned char" or "void" before I submit the patches for them.
>
> -John
> wb8tyw at qsl.network
> Personal Opinion Only
>
> Cameron Simpson wrote:
>
> > On Sun, Jan 06, 2002 at 10:56:50AM -0600, John Malmberg <wb8tyw at qsl.net> wrote:
> > | In socket.c, the variable error is unitilialzed.
> > | Also the variable length should be an unsigned int.
> > |
> > |
> > | EAGLE> type socket.gdiff
> > | --- ref_src:socket.c Sat Jan 5 13:27:07 2002
> > | +++ lcl_src:socket.c Sun Jan 6 08:40:51 2002
> > | @@ -1,3 +1,4 @@
> > | +/* Converted by prj_src:unix_c_to_vms_c.tpu AND prj_src:socket.tpu on
> > | 6-JAN-20
> > | 02 08:40:51.01 OPENVMS_AXP */
> > | /* -*- c-file-style: "linux" -*-
> > |
> > | Copyright (C) 1992-2001 by Andrew Tridgell <tridge at samba.org>
> > | @@ -105,7 +106,8 @@
> > | bhints.ai_family = ai_family;
> > | bhints.ai_socktype = ai_socktype;
> > | bhints.ai_flags = AI_PASSIVE;
> > | - if (getaddrinfo(bind_address, NULL, &bhints, &bres_all) == -1) {
> > | + error = getaddrinfo(bind_address, NULL, &bhints, &bres_all);
> > | + if (error == -1) {
> >
> > Shouldn't that be "error != 0" ?
> >
More information about the rsync
mailing list