3 ms·
Probably off-topic: I may miss something but I have the feeling the shown C program should segfault a lot as the variable `fname` in `char* make_filename(const
by dadie 3y ago
Probably off-topic: I may miss something but I have the feeling the shown C program should segfault a lot as the variable `fname` in `char* make_filename(const char*)` does not seem to be initialized.
- ab71e5 3y agoYeah it should be something like char fname[BUFSIZE]; Also better to pass that in as a variable I don't think you can return a char array allocated on the stack like that