Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 4f3aa76 in mainline for kernel/generic/src/lib/str.c


Ignore:
Timestamp:
2018-11-09T22:03:24Z (3 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master
Children:
ba9a150
Parents:
b389f95
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-08 01:26:04)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-09 22:03:24)
Message:

Remove nfmalloc()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/lib/str.c

    rb389f95 r4f3aa76  
    635635{
    636636        size_t size = str_size(src) + 1;
    637         char *dest = nfmalloc(size);
    638         assert(dest);
     637        char *dest = malloc(size);
     638        if (!dest)
     639                return NULL;
    639640
    640641        str_cpy(dest, size, src);
     
    668669                size = n;
    669670
    670         char *dest = nfmalloc(size + 1);
    671         assert(dest);
     671        char *dest = malloc(size + 1);
     672        if (!dest)
     673                return NULL;
    672674
    673675        str_ncpy(dest, size + 1, src, size);
Note: See TracChangeset for help on using the changeset viewer.