Pārlūkot izejas kodu

fixed username function (wtf happened here?)

master
Aaron Marcher pirms 8 gadiem
committed by Aaron Marcher (drkhsh)
vecāks
revīzija
545f1560e6
1 mainītis faili ar 5 papildinājumiem un 4 dzēšanām
  1. +5
    -4
      slstatus.c

+ 5
- 4
slstatus.c Parādīt failu

@@ -455,11 +455,12 @@ username(void)
uid_t uid = geteuid();
struct passwd *pw = getpwuid(uid);

if (pw == NULL)
return smprintf("%s", pw->pw_name);
if (pw == NULL) {
warn("Could not get username");
return smprintf(UNKNOWN_STR);
}

warn("Could not get username");
return smprintf(UNKNOWN_STR);
return smprintf("%s", pw->pw_name);
}

static char *


Notiek ielāde…
Atcelt
Saglabāt