Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Jul 2005 12:08:38 -0700
From:      Maksim Yevmenkin <maksim.yevmenkin@savvis.net>
To:        Stefan Sperling <stsp@stsp.in-berlin.de>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: bus error in strsep
Message-ID:  <42CC2C36.7090003@savvis.net>
In-Reply-To: <20050706185536.GA4700@dice.seeling33.de>
References:  <20050706185536.GA4700@dice.seeling33.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Stefan,

> int main(int argc, char* argv[])
> {
> 	char *c = "whats:your:name:buddy?";
         ^^^^^^^^^^^^^^^^ that is not read only copy. you can not write 
into it. replace it with

         char *c = strdup("whats:your:name:buddy?");
> 	(void*)mystrsep(&c, ":");
> }
> 

and it should work.

thanks,
max



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42CC2C36.7090003>