Skip to content
Snippets Groups Projects
Commit 74057d53 authored by Lev Walkin's avatar Lev Walkin
Browse files

portability

parent 91f5cd06
No related branches found
No related tags found
No related merge requests found
......@@ -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>
......
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment