Kaynağa Gözat

Check printf() for output errors

This way cases like

	$ slstatus -s > /dev/full

are properly caught and the program terminated with the proper return
code.
master
Laslo Hunhold 6 yıl önce
committed by Aaron Marcher
ebeveyn
işleme
9c9ce8a125
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. +3
    -1
      slstatus.c

+ 3
- 1
slstatus.c Dosyayı Görüntüle

@@ -102,7 +102,9 @@ main(int argc, char *argv[])
}

if (sflag) {
printf("%s\n", status);
if (printf("%s\n", status) < 0) {
die("printf:");
}
} else {
if (XStoreName(dpy, DefaultRootWindow(dpy), status) < 0) {
die("XStoreName: Allocation failed");


Yükleniyor…
İptal
Kaydet