Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

avoid a dangerous cast (in an unused function)

  • Loading branch information...
commit bc8930e32d702988c72731a52197ed10a68e64b9 1 parent bd8052a
Tony Cook authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 datatypes.c
View
6 datatypes.c
@@ -162,15 +162,15 @@ llist_pop(struct llist *l,void *data) {
void
llist_dump(struct llist *l) {
- int k,j;
+ int j;
int i=0;
struct llink *lnk;
lnk=l->h;
while(lnk != NULL) {
for(j=0;j<lnk->fill;j++) {
/* memcpy(&k,(char*)(lnk->data)+l->ssize*j,sizeof(void*));*/
- memcpy(&k,(char*)(lnk->data)+l->ssize*j,sizeof(void*));
- printf("%d - %X\n",i,k);
+ /*memcpy(&k,(char*)(lnk->data)+l->ssize*j,sizeof(void*));*/
+ printf("%d - %p\n",i,*(void **)((lnk->data)+l->ssize*j));
i++;
}
lnk=lnk->n;
Please sign in to comment.
Something went wrong with that request. Please try again.