List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:December 6 2000 12:52pm
Subject:Re: rmdir() failing under OS/2
View as plain text  
hi!

>>>>> "Yuri" == Yuri Dario <mc6530@stripped> writes:

Yuri> Hi Monty,
>> +     char *pos=strend(path);
>> +     if (pos > path && pos[-1] == FN_LIBCHAR)
>> +       *--pos=0;

Yuri> but path is declared as 'const char *': so it is supposed to be
Yuri> read-only memory.
Yuri> Shouldn't be better to use strdup() and modify the copy?

The above will work ok;  The path above is pointing to the local
variable tmp_path in this context

I agree however that this is confusion and I will introduce a new
variable to fix that.

Regards,
Monty
Thread
rmdir() failing under OS/2Yuri Dario5 Dec
  • rmdir() failing under OS/2Michael Widenius6 Dec
    • Re: rmdir() failing under OS/2Yuri Dario6 Dec
      • Re: rmdir() failing under OS/2Michael Widenius6 Dec
      • Re: rmdir() failing under OS/2Michael Widenius6 Dec