Changeset 3863 in MondoRescue


Ignore:
Timestamp:
Mar 7, 2024, 11:50:40 AM (3 months ago)
Author:
Bruno Cornec
Message:

eliminate the last sprintf from libmondo-fork.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/mondo/src/common/libmondo-fork.c

    r3855 r3863  
    165165        p = strstr(tmp2, "2>>");
    166166        if (p) {
    167             sprintf(p, "   ");
    168             while (*p == ' ') {
    169                 p++;
    170             }
     167            /* overwrites the 2>> */
     168            *p++ = ' ';
     169            *p++ = ' ';
     170            *p++ = ' ';
     171            /* skip remaining spaces */
     172            for (; (*p == ' ') && (*p != '\0'); p++);
     173            /* overwrites what is after the 2>> */
    171174            for (; (*p != ' ') && (*p != '\0'); p++) {
    172175                *p = ' ';
Note: See TracChangeset for help on using the changeset viewer.