🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #1892

Lattice 5.04 problem with free()

#1892
From: Todd Carpenter
Date: Sat, 28 Oct 1989 21:51
31 lines
920 bytes
Does free() return a value?  It used to, in 5.02.  I just installed 5.04, and
attempted to recompile some things, and got errors when checking free() to see
if it returns a fail code.

/* silly code example */
#include <stdlib.h>

main()
{
  char *temp;

  temp = malloc (6);
  strcpy(temp,"Hello");
  if (free(temp) != 0)
    return (1);
  return (0);
}

compile with 
>lc -L tmp.

  if(free(temp) != 0);
                 ^
tmp.c 7 Error 91: illegal void operand


Any ideas out there?  Am I using something wrong that managed to get by 5.02
all right?

-Todd C.
Technical Details
Message-ID: <36769@srcsip.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!srcsip!coltrane!carpent

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!srcsip!coltrane!carpent
From: carpent@SRC.Honeywell.COM (Todd Carpenter)
Newsgroups: comp.sys.amiga.tech
Subject: Lattice 5.04 problem with free()
Message-ID: <36769@srcsip.UUCP>
Date: 28 Oct 89 21:51:36 GMT
Sender: news@src.honeywell.COM
Lines: 31