Changeset 32613


Ignore:
Timestamp:
Jul 8, 2017, 2:53:24 PM (12 days ago)
Author:
brainslayer
Message:

for error handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/libutils/utils.c

    r32603 r32613  
    73747374{
    73757375        FILE *fp = fopen("/proc/sys/kernel/random/uuid", "rb");
    7376         fscanf(fp, "%s", buf);
    7377         fclose(fp);
     7376        if (fp) {
     7377                fscanf(fp, "%s", buf);
     7378                fclose(fp);
     7379                return buf;
     7380        }
     7381        return NULL;
    73787382}
    73797383
Note: See TracChangeset for help on using the changeset viewer.