| 382 | } |
| 383 | |
| 384 | void |
| 385 | kstrcpy(Kstring *kstr, const char *str) |
| 386 | { |
| 387 | const int lastByte = sizeof(kstr->buf) - 1; |
| 388 | |
| 389 | kstr->buf[lastByte] = '\0'; |
| 390 | strncpy(kstr->buf, str, sizeof(kstr->buf)); |
| 391 | assert(kstr->buf[lastByte] == '\0'); |
| 392 | } |
| 393 | |
| 394 | void |
| 395 | ksprintf(Kstring *kstr, const char *fmt,...) |
no outgoing calls
no test coverage detected