Group :: Sistema/Base
RPM: incron
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: incron-0.5.10-alt2.patch
Download
Download
appargs.cpp | 1 +
appinst.h | 1 +
incroncfg.h | 1 +
incrontab.cpp | 13 ++++++++++++-
inotify-cxx.h | 1 +
5 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/appargs.cpp b/appargs.cpp
index e441de1..0b2e780 100644
--- a/appargs.cpp
+++ b/appargs.cpp
@@ -25,6 +25,7 @@
#include <cstdio>
#include <cstring>
+#include <cstdio>
#include "strtok.h"
diff --git a/appinst.h b/appinst.h
index d5f2cbe..bdbc8e7 100644
--- a/appinst.h
+++ b/appinst.h
@@ -23,6 +23,7 @@
#include <string>
+#include <cstdio>
#define APPLOCK_BASEDIR "/var/run"
diff --git a/incroncfg.h b/incroncfg.h
index 5d2c5b2..12aaf7d 100644
--- a/incroncfg.h
+++ b/incroncfg.h
@@ -19,6 +19,7 @@
#include <cstring>
+#include <cstdio>
#include <map>
/// Configuration class.
diff --git a/incrontab.cpp b/incrontab.cpp
index f3d6fcf..65e1d51 100644
--- a/incrontab.cpp
+++ b/incrontab.cpp
@@ -90,15 +90,24 @@ bool IncronTabEntry::Parse(const std::string& rStr, IncronTabEntry& rEntry)
StringTokenizer tok(rStr, ' ', '\\');
if (!tok.HasMoreTokens())
+ {
+// fprintf(stderr,"Invalid table format\n");
return false;
+ }
s1 = tok.GetNextToken(true);
if (!tok.HasMoreTokens())
+ {
+// fprintf(stderr,"Invalid table format\n");
return false;
+ }
s2 = tok.GetNextToken(true);
if (!tok.HasMoreTokens())
+ {
+// fprintf(stderr,"Invalid table format\n");
return false;
+ }
tok.SetNoPrefix();
s3 = tok.GetRemainder();
@@ -173,8 +182,10 @@ bool IncronTab::Save(const std::string& rPath)
{
FILE* f = fopen(rPath.c_str(), "w");
if (f == NULL)
+ {
+ fprintf(stderr,"cannot save\n");
return false;
-
+ }
std::deque<IncronTabEntry>::iterator it = m_tab.begin();
while (it != m_tab.end()) {
fputs((*it).ToString().c_str(), f);
diff --git a/inotify-cxx.h b/inotify-cxx.h
index bb3a0e6..d270f9c 100644
--- a/inotify-cxx.h
+++ b/inotify-cxx.h
@@ -28,6 +28,7 @@
#include <stdint.h>
#include <string>
+#include <cstdio>
#include <deque>
#include <map>