ipchat-devel
[Top][All Lists]
Advanced

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

[ipchat-devel] this patch fix catch error and signed unsigned comparaiso


From: ml
Subject: [ipchat-devel] this patch fix catch error and signed unsigned comparaison on ui_input.c
Date: Sun, 08 Jul 2012 02:32:00 +0200

address@hidden src]$ diff
-u /home/swilting/Bureau/ipchat-0.5/src/ui_input.c ui_input.c
--- /home/swilting/Bureau/ipchat-0.5/src/ui_input.c     2011-04-19
20:58:21.000000000 +0200
+++ ui_input.c  2012-07-06 08:43:39.884533004 +0200
@@ -22,10 +22,12 @@
 #include <stdio.h>             /* stdlib.h (on some systems) */
 #include <stdlib.h>            /* malloc, realloc, free, atoi */
 #include <string.h>            /* memcpy, memcmp */
+#include <wctype.h>
 #include "ui_common.h"
 #include "uconfig.h"
 #include "misc.h"
 
+
 /* Prototypes */
 static void input_left ();
 static void input_right ();
@@ -346,7 +348,7 @@
        memcpy (cur->ibuf, cur->hist[cur->hist_pos], len * sizeof(wchar_t));
        cur->ibuf_len = len;
        cur->icursor = len;
-       if (len < i_input.ncols)
+       if (( signed int)len < i_input.ncols)
                cur->ishow = 0;
        else
                cur->ishow = len - i_input.ncols + 1;
@@ -369,7 +371,7 @@
        prev--;
 
        len = wcslen (cur->hist[prev]);
-       return (len == cur->ibuf_len &&
+       return ((signed int)len == cur->ibuf_len &&
                memcmp (cur->ibuf, cur->hist[prev], len * sizeof(wchar_t))
                == 0);
 }


-- 
  http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC2626742
  gpg --keyserver pgp.mit.edu --recv-key C2626742

  http://urlshort.eu fakessh @
  http://gplus.to/sshfake
  http://gplus.to/sshswilting
  http://gplus.to/john.swilting
  https://lists.fakessh.eu/mailman/
  This list is moderated by me, but all applications will be accepted
  provided they receive a note of presentation

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée


reply via email to

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