ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/tools.c
(Generate patch)

Comparing projects/libstatgrab/src/libstatgrab/tools.c (file contents):
Revision 1.36 by ats, Sun Apr 4 23:48:26 2004 UTC vs.
Revision 1.37 by ats, Sun Apr 4 23:55:48 2004 UTC

# Line 411 | Line 411 | size_t strlcat(char *dst, const char *src, size_t siz)
411  
412   #endif
413  
414 + char *update_string(char **dest, const char *src) {
415 +        char *new;
416 +
417 +        new = realloc(*dest, strlen(src) + 1);
418 +        if (new == NULL) {
419 +                return NULL;
420 +        }
421 +
422 +        strcpy(new, src);
423 +        *dest = new;
424 +        return new;
425 + }
426 +
427   long long get_ll_match(char *line, regmatch_t *match){
428          char *ptr;
429          long long num;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines