Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / audio / cddbd / patches / patch-xmit_c
blobfe712821fab86f0949681aff62610307893b75af
1 $NetBSD$
3 - needs stdlib.h instead of casting return value of malloc
4 - other LP64 fixes
6 --- xmit.c~     1996-12-22 03:49:54.000000000 +0000
7 +++ xmit.c
8 @@ -30,6 +30,7 @@ static char *_sites_c_ident_ = "@(#)$Id:
9  #include <string.h>
10  #include <fcntl.h>
11  #include <stdio.h>
12 +#include <stdlib.h>
13  #include <errno.h>
14  #include <dirent.h>
15  #include <time.h>
16 @@ -571,12 +572,12 @@ cddbd_do_transmit(site_t *sp)
17                 }
19                 /* Don't transmit the same file twice. */
20 -               if(list_find(li, (void *)(int)sbuf.st_ino) != 0) {
21 +               if(list_find(li, (void *)(uintptr_t)sbuf.st_ino) != 0) {
22                         files--;
23                         continue;
24                 }
26 -               if(list_add_cur(li, (void *)(int)sbuf.st_ino) == 0) {
27 +               if(list_add_cur(li, (void *)(uintptr_t)sbuf.st_ino) == 0) {
28                         cddbd_log(LOG_ERR, "Can't malloc linked list entry.");
30                         if(!cddbd_close_history()) {
31 @@ -1112,7 +1113,7 @@ cddbd_write_history(char *dir, unsigned 
32  {
33         tfile_t *tf;
35 -       if((tf = (tfile_t *)malloc(sizeof(tfile_t))) == NULL) {
36 +       if((tf = malloc(sizeof(tfile_t))) == NULL) {
37                 cddbd_log(LOG_ERR | LOG_XMIT,
38                     "Can't malloc transmit list entry.");
39                 quit(QUIT_ERR);