On 18.05.2011 16:30, Jan Friesse wrote:
Jerome Flesch wrote:
---
  exec/coroipcs.c    |    2 +-
  exec/totemconfig.c |    4 ++--
  exec/tsafe.c       |   12 ------------
  3 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/exec/coroipcs.c b/exec/coroipcs.c
index a58c269..4c18c10 100644
--- a/exec/coroipcs.c
+++ b/exec/coroipcs.c
@@ -1241,7 +1241,7 @@ static void memcpy_dwrap (struct conn_info *conn_info, 
void *msg, unsigned int l
        write_idx = conn_info->control_buffer->write;

        memcpy (&conn_info->dispatch_buffer[write_idx], msg, len);
-       conn_info->control_buffer->write = ((write_idx + len + 7)&  0xFFFFFFFF8) % 
conn_info->dispatch_size;
+       conn_info->control_buffer->write = ((write_idx + len + 7)&  0xFFFFFFF8) % 
conn_info->dispatch_size;
  }

  static void msg_send (void *conn, const struct iovec *iov, unsigned int 
iov_len,
diff --git a/exec/totemconfig.c b/exec/totemconfig.c
index fa5ab9c..f5d7f7b 100644
--- a/exec/totemconfig.c
+++ b/exec/totemconfig.c
@@ -473,12 +473,12 @@ int totem_config_validate (
                        goto parse_error;
                }

-               if (totem_config->interfaces[i].ttl>  255 || 
totem_config->interfaces[i].ttl<  0) {
+               if (totem_config->interfaces[i].ttl>  255) {
                        error_reason = "Invalid TTL (should be 0..255)";
                        goto parse_error;
                }

There is no guarantee that int is signed or unsigned. Easiest solution
seems to be type ttl to unsigned and let only test for>  255.

Actually, it is already explicitly an unsigned integer, this is why I did this change.

include/corosync/totem/totem.h:
struct totem_interface {
        (...)
        uint16_t ttl;
        (...)
};


                if (totem_config->transport_number != TOTEM_TRANSPORT_UDP&&
-                   totem_config->interfaces[i].ttl != 1) {
+                       totem_config->interfaces[i].ttl != 1) {
                        error_reason = "Can only set ttl on multicast transport 
types";
                        goto parse_error;
                }

Not needed

I agree. I will remake the patch without it.


diff --git a/exec/tsafe.c b/exec/tsafe.c
index 20ce79a..606b45b 100644
--- a/exec/tsafe.c
+++ b/exec/tsafe.c
@@ -978,18 +978,6 @@ void setpwent(void)
        assert(0);
  }

-void setutxent(void)
-{
-       static void (*real_setutxent)(void) = NULL;
-       if (!tsafe_inited || tsafe_disabled) {
-               if (real_setutxent == NULL) {
-                       real_setutxent = _get_real_func_ ("setutxent");
-               }
-               return real_setutxent ();
-       }
-       assert(0);
-}
-

Please surround this function with ifdef HAVE_UTMPX_H and don't delete
it (Linux and other systems HAS support for this function).


  char *strerror(int errnum)
  {
        static char *(*real_strerror)(int errnum) = NULL;




Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to