[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/src ChangeLog sign.c
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/src ChangeLog sign.c |
Date: |
Fri, 26 May 2006 04:03:51 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Branch:
Changes by: Derek Robert Price <address@hidden> 06/05/26 04:03:51
Modified files:
src : ChangeLog sign.c
Log message:
* sign.c: Include <inttypes.h>.
(sign): Avoid long long.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/ChangeLog.diff?tr1=1.3430&tr2=1.3431&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/sign.c.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
Patches:
Index: ccvs/src/ChangeLog
diff -u ccvs/src/ChangeLog:1.3430 ccvs/src/ChangeLog:1.3431
--- ccvs/src/ChangeLog:1.3430 Thu May 25 14:49:31 2006
+++ ccvs/src/ChangeLog Fri May 26 04:03:51 2006
@@ -1,3 +1,8 @@
+2006-05-25 Derek Price <address@hidden>
+
+ * sign.c: Include <inttypes.h>.
+ (sign): Avoid long long.
+
2006-05-25 Larry Jones <address@hidden>
* sanity.sh: Add -v|--verbose option to echo test names. Clean
Index: ccvs/src/sign.c
diff -u ccvs/src/sign.c:1.6 ccvs/src/sign.c:1.7
--- ccvs/src/sign.c:1.6 Wed May 17 18:17:39 2006
+++ ccvs/src/sign.c Fri May 26 04:03:51 2006
@@ -27,6 +27,7 @@
#include <assert.h>
#include <errno.h>
#include <getopt.h>
+#include <inttypes.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -628,20 +629,21 @@
if (delkey)
{
char *n;
- long long tmp;
+ long tmp;
- tmp = strtoull (delkey, &n, 0);
+ tmp = strtoul (delkey, &n, 0);
if (n == delkey || *n != '\0' || tmp == 0)
{
error (0, 0, "invalid key ID `%s'", delkey);
return 1;
}
- if (tmp > UINT32_MAX)
+ if ((sizeof (tmp) > 4 && tmp > UINT32_MAX) || tmp == ULONG_MAX)
{
- error (0, 0, "invalid key ID `%s'", delkey);
+ error (0, ERANGE, "key ID (`%s') should fit in 32 bits",
+ delkey);
return 1;
}
- args.keyid = (uint32_t) tmp;
+ args.keyid = (uint32_t)(tmp & 0xFFFFFFFF);
}
else
args.keyid = 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Cvs-cvs] ccvs/src ChangeLog sign.c,
Derek Robert Price <=