aboutsummaryrefslogtreecommitdiffstats
path: root/skeletons
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2004-08-11 09:17:15 +0000
committerLev Walkin <vlm@lionet.info>2004-08-11 09:17:15 +0000
commit74057d535e40b19def01867cfb10ddd14a30db1d (patch)
treee5c5e21560b0e5d613e8d0f1117ae0c7d78780b0 /skeletons
parent91f5cd0647623d3d1823c6e6bd650adf80ba3242 (diff)
portability
Diffstat (limited to 'skeletons')
-rw-r--r--skeletons/GeneralizedTime.c1
-rw-r--r--skeletons/OBJECT_IDENTIFIER.c4
2 files changed, 2 insertions, 3 deletions
diff --git a/skeletons/GeneralizedTime.c b/skeletons/GeneralizedTime.c
index c65d2960..9b8c1aa1 100644
--- a/skeletons/GeneralizedTime.c
+++ b/skeletons/GeneralizedTime.c
@@ -2,7 +2,6 @@
* Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
-#define __USE_BSD /* To enable tm_gmtoff in glibc */
#include <GeneralizedTime.h>
#include <time.h>
#include <errno.h>
diff --git a/skeletons/OBJECT_IDENTIFIER.c b/skeletons/OBJECT_IDENTIFIER.c
index baf3e423..7579349f 100644
--- a/skeletons/OBJECT_IDENTIFIER.c
+++ b/skeletons/OBJECT_IDENTIFIER.c
@@ -191,7 +191,7 @@ OBJECT_IDENTIFIER_get_single_arc(uint8_t *arcbuf, unsigned int arclen, signed in
int v = add + *(unsigned char *)rvbuf;
if(v & (-1 << CHAR_BIT)) {
*(unsigned char *)rvbuf
- = v + (1 << CHAR_BIT);
+ = (unsigned char)(v + (1 << CHAR_BIT));
add = -1;
} else {
*(unsigned char *)rvbuf = v;
@@ -223,7 +223,7 @@ OBJECT_IDENTIFIER_print_arc(uint8_t *arcbuf, int arclen, int add,
/* Fill the scratch buffer in reverse. */
p = scratch + sizeof(scratch);
for(; accum; accum /= 10)
- *(--p) = (accum % 10) + 0x30;
+ *(--p) = (char)(accum % 10) + 0x30;
return cb(p, sizeof(scratch) - (p - scratch), app_key);
}