Re: bus error in strsep
From: Giorgos Keramidas (keramida_at_freebsd.org)
Date: 07/06/05
- Previous message: Julian Elischer: "Re: Using a logitech mx700 with scrollwheel _and_ thumb buttons"
- In reply to: Maksim Yevmenkin: "Re: bus error in strsep"
- Next in thread: Maksim Yevmenkin: "Re: bus error in strsep"
- Reply: Maksim Yevmenkin: "Re: bus error in strsep"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 6 Jul 2005 23:39:24 +0300 To: Maksim Yevmenkin <maksim.yevmenkin@savvis.net>
On 2005-07-06 12:08, Maksim Yevmenkin <maksim.yevmenkin@savvis.net> 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
>
> char *c = strdup("whats:your:name:buddy?");
Or the following:
char c[] = "whats:your:name:buddy?";
which doesn't require a free() operation when you're done with c[].
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Julian Elischer: "Re: Using a logitech mx700 with scrollwheel _and_ thumb buttons"
- In reply to: Maksim Yevmenkin: "Re: bus error in strsep"
- Next in thread: Maksim Yevmenkin: "Re: bus error in strsep"
- Reply: Maksim Yevmenkin: "Re: bus error in strsep"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]