Kaynağa Gözat

fixed username function (wtf happened here?)

master
Aaron Marcher 8 yıl önce
committed by Aaron Marcher (drkhsh)
ebeveyn
işleme
545f1560e6
1 değiştirilmiş dosya ile 5 ekleme ve 4 silme
  1. +5
    -4
      slstatus.c

+ 5
- 4
slstatus.c Dosyayı Görüntüle

@@ -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 *


Yükleniyor…
İptal
Kaydet