axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] 20070914.01.tpd.patch


From: Waldek Hebisch
Subject: Re: [Axiom-developer] 20070914.01.tpd.patch
Date: Fri, 14 Sep 2007 16:45:09 +0200 (CEST)

> This patch has been applied and tested.
> 
<snip>
> diff --git a/src/hyper/hyper.pamphlet b/src/hyper/hyper.pamphlet
> index 2126df1..1e44d61 100644
> --- a/src/hyper/hyper.pamphlet
> +++ b/src/hyper/hyper.pamphlet
> @@ -945,11 +945,14 @@ make_server_connections(void)
>       */
>  
>      if (open_server(MenuServerName) == -2) {
> -        fprintf(stderr, "(HyperDoc) Warning: Not connected to AXIOM 
> Server!\n");
> -        MenuServerOpened = 0;
> +       fprintf(stderr, "(HyperDoc) Warning: Not connected to AXIOM 
> Server!\n");
> +       MenuServerOpened = 0;
>      }
>      else
> -        MenuServerOpened = 1;
> +     /* In order to allow hyperdoc restarts from the console we clean up
> +      * the socket on exit */
> +       atexit(&clean_socket);
> +       MenuServerOpened = 1;
>  
>  
>      /*

Tim, the above is wrong: you need braces (as I and Alfredo did) if
you put multiple C statements in 'else' branch.  What you wrote
is equivalent to:


>      if (open_server(MenuServerName) == -2) {
>         fprintf(stderr, "(HyperDoc) Warning: Not connected to AXIOM 
> Server!\n\");
>      }
>      else
>      /* In order to allow hyperdoc restarts from the console we clean up
>       * the socket on exit */
>         atexit(&clean_socket);
>
>      MenuServerOpened = 1;

(with dead store eliminated).  In other words, you unconditionally
set MenuServerOpened to 1.  I am not sure if this will show up
in testing, but is clealy wrong.

-- 
                              Waldek Hebisch
address@hidden 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]