File cdp-0.33.13-aliasing.diff of Package cdp
--- database.c
+++ database.c
@@ -96,14 +96,16 @@
struct trackinfo *newtrk;
/* Easy case: the list is empty */
- if (pStatus->thiscd.trk == NULL)
+ if (pStatus->thiscd.trk == NULL) {
if ((pStatus->thiscd.trk = (struct trackinfo *) calloc (1,
sizeof (*newtrk))) == NULL) {
nomem:
perror ("insert_trackinfo");
myExit (1);
- } else
+ } else {
return;
+ }
+ }
/* Stick the new entry in cd->trk[]. */
if ((newtrk = (struct trackinfo *) malloc (sizeof (*newtrk) *
@@ -353,8 +355,9 @@
/* Free some memory and set a pointer to null. */
void
-freeup (void **x)
+freeup (void *_x)
{
+ void **x = _x;
if (*x != NULL) {
free (*x);
*x = NULL;
@@ -546,7 +549,7 @@
}
if (prefs)
- freeup ((void **) &otherrc);
+ freeup (&otherrc);
firstpos = -1;
while (!feof (fp)) {
@@ -847,11 +850,12 @@
i = track ? trackmap[track - 1] : 0;
buf = prefs ? i ? &cd->trk[i].otherrc : &cd->otherrc :
i ? &cd->trk[i].otherdb : &cd->otherdb;
- if (firstpos == -1)
+ if (firstpos == -1) {
if (prefs)
buf = &otherrc;
- else
+ else
goto chomp;
+ }
strmcat (buf, keyword);
do {