Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Jul 2005 12:10:23 -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:  <42CC2C9F.5000301@savvis.net>
In-Reply-To: <42CC2C36.7090003@savvis.net>
References:  <20050706185536.GA4700@dice.seeling33.de> <42CC2C36.7090003@savvis.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Maksim Yevmenkin wrote:
> 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

made type. that should read "that is read only copy" :)

> 
>         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?42CC2C9F.5000301>