Ex:
struct someStruct* badfunc(){
struct someStruct toReturn;
toReturn.a = foo();
toReturn.b = bar();
return &toReturn;
}
In most people's code, this would probably work... struct someStruct a = *badfunc();
func2(); // This will overwrite the "toReturn"
// from the last call, but as long as the
// struct was copied before any other function
// call, you're probably fine though in
// undefined-behavior land
-----------------Either that, or you're talking about strtok (and other non-reentrant functions).