Hi,
There's a weird piece of code in mt.c.
I guess it's supposed to be a check for truncation when assigning a
long variable to an int, which includes a typo.
The (count = val) != count) condition is evaluated to FALSE by gcc.

Signed-off-by: Vitezslav Cizek <[email protected]>
---
 src/mt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mt.c b/src/mt.c
index cc5cbb9..15c3d77 100644
--- a/src/mt.c
+++ b/src/mt.c
@@ -208,7 +208,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
          {
            char *p;
            long val = strtol (arg, &p, 0);
-           if (*p || (count = val) != count)
+           if (*p || (count = val) != val)
              error (MT_EXIT_INVOP, 0, _("invalid count value"));
          }
          break;
-- 
1.8.4.5


-- 
Vita Cizek

Attachment: signature.asc
Description: Digital signature

Reply via email to