safe_oname() always returns a valid pointer to * a string, either the pointer to an object's name * if it has one, or a pointer to an empty string * if it doesn't. */
| 92 | * if it doesn't. |
| 93 | */ |
| 94 | const char * |
| 95 | safe_oname(struct obj *obj) |
| 96 | { |
| 97 | if (has_oname(obj)) |
| 98 | return ONAME(obj); |
| 99 | return ""; |
| 100 | } |
| 101 | |
| 102 | /* get a name for a monster or an object from player; |
| 103 | truncate if longer than PL_PSIZ, then return it */ |
no outgoing calls
no test coverage detected