Changeset 08e103d4 in mainline for uspace/lib/sif/src/sif.c
- Timestamp:
- 2019-02-05T18:26:05Z (6 years ago)
- Children:
- 1d2f85e
- Parents:
- d066259
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-05 16:16:55)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-05 18:26:05)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/sif/src/sif.c
rd066259 r08e103d4 702 702 { 703 703 char *str; 704 size_t str_ size;704 size_t str_bytes; 705 705 size_t sidx; 706 706 int c; 707 707 errno_t rc; 708 708 709 str_ size= 1;709 str_bytes = 1; 710 710 sidx = 0; 711 str = malloc(str_ size+ 1);711 str = malloc(str_bytes + 1); 712 712 if (str == NULL) 713 713 return ENOMEM; … … 737 737 } 738 738 739 if (sidx >= str_ size) {740 str_ size*= 2;741 str = realloc(str, str_ size+ 1);739 if (sidx >= str_bytes) { 740 str_bytes *= 2; 741 str = realloc(str, str_bytes + 1); 742 742 if (str == NULL) { 743 743 rc = ENOMEM;
Note:
See TracChangeset
for help on using the changeset viewer.