ソースを参照

fixed username function (wtf happened here?)

master
Aaron Marcher 8年前
committed by Aaron Marcher (drkhsh)
コミット
545f1560e6
1個のファイルの変更5行の追加4行の削除
  1. +5
    -4
      slstatus.c

+ 5
- 4
slstatus.c ファイルの表示

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


読み込み中…
キャンセル
保存