Ad
  • Custom User Avatar

    True, it would be safer and good practice to return pointer to const.
    On the other hand, I would never assume any char pointer returned by some function safe for changing unless this is clearly documented for this function. This is C, if you want to make problems you can even cast const to non-const.