From 3bab9d79a01ac70a78c012eaa82dccaaa5c59ee5 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 9 Aug 2009 12:11:03 +0200 Subject: fix compile-time warnings. One fix (in CCrashWatcher::GetPluginsInfo) needs closer look, others are "trivially correct" Signed-off-by: Denys Vlasenko --- lib/Utils/xfuncs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/Utils/xfuncs.cpp') diff --git a/lib/Utils/xfuncs.cpp b/lib/Utils/xfuncs.cpp index 078c8045..60c2eb4f 100644 --- a/lib/Utils/xfuncs.cpp +++ b/lib/Utils/xfuncs.cpp @@ -88,6 +88,12 @@ void xpipe(int filedes[2]) perror_msg_and_die("can't create pipe"); } +void xdup(int from) +{ + if (dup(from) < 0) + perror_msg_and_die("can't duplicate file descriptor"); +} + void xdup2(int from, int to) { if (dup2(from, to) != to) -- cgit