diff options
Diffstat (limited to 'st.c')
| -rw-r--r-- | st.c | 6 |
1 files changed, 2 insertions, 4 deletions
| @@ -549,12 +549,10 @@ xrealloc(void *p, size_t len) { | |||
| 549 | 549 | ||
| 550 | char * | 550 | char * |
| 551 | xstrdup(char *s) { | 551 | xstrdup(char *s) { |
| 552 | char *p = strdup(s); | 552 | if((s = strdup(s)) == NULL) |
| 553 | |||
| 554 | if (!p) | ||
| 555 | die("Out of memory\n"); | 553 | die("Out of memory\n"); |
| 556 | 554 | ||
| 557 | return p; | 555 | return s; |
| 558 | } | 556 | } |
| 559 | 557 | ||
| 560 | size_t | 558 | size_t |
