]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Makefile.am:
authorDamir Tomic <viperus@ntp.org>
Wed, 19 Aug 2015 23:10:57 +0000 (01:10 +0200)
committerDamir Tomic <viperus@ntp.org>
Wed, 19 Aug 2015 23:10:57 +0000 (01:10 +0200)
  added 2 more temp files to CLEANFILES and DISTCLEAN, because it prevented make distcheck from finishing properly
pathfind.c:
  reverted emalloc to malloc with if(result == NULL)... because sntp/ doesn't link libntp...probably for a reason unknown to me.

bk: 55d50d012hi-Qnhn_CyLn4HcpbdcdQ

sntp/libopts/compat/pathfind.c
sntp/tests/Makefile.am

index 5890ec62f537c4fa62df6e2360ad8eae8f4db813..d343dcc643de2ac06259c816b29681ac4cd9aff6 100644 (file)
@@ -19,7 +19,7 @@ pathfind( char const * path,
           char const * fname,
           char const * mode )
 {
-    return estrdup(fname);
+    return strdup(fname);
 }
 #else
 
@@ -114,10 +114,16 @@ make_absolute( char const * string, char const * dot_path )
     int result_len;
 
     if (!dot_path || *string == '/') {
-        result = estrdup( string );
+        result = strdup( string );
+       if (result == NULL) {
+       return NULL;    /* couldn't allocate memory    */
+       }
     } else {
         if (dot_path && dot_path[0]) {
-            result = emalloc( 2 + strlen( dot_path ) + strlen( string ) );
+            result = malloc( 2 + strlen( dot_path ) + strlen( string ) );
+               if (result == NULL) {
+               return NULL;    /* couldn't allocate memory    */
+               }               
             strcpy( result, dot_path );
             result_len = (int)strlen(result);
             if (result[result_len - 1] != '/') {
@@ -125,7 +131,10 @@ make_absolute( char const * string, char const * dot_path )
                 result[result_len] = '\0';
             }
         } else {
-            result = emalloc( 3 + strlen( string ) );
+            result = malloc( 3 + strlen( string ) );
+               if (result == NULL) {
+               return NULL;    /* couldn't allocate memory    */
+               }
             result[0] = '.'; result[1] = '/'; result[2] = '\0';
             result_len = 2;
         }
@@ -154,8 +163,10 @@ canonicalize_pathname( char *path )
     char stub_char, *result;
 
     /* The result cannot be larger than the input PATH. */
-    result = estrdup( path );
-
+    result = strdup( path );
+       if (result == NULL) {
+       return NULL;    /* couldn't allocate memory    */
+       }
     stub_char = (*path == '/') ? '/' : '.';
 
     /* Walk along RESULT looking for things to compact. */
index c481aee8ea9ae5f4280e1878fc3bcd16d0854e91..8a5c09f030816acd3a9e457a8275eb3074760a89 100644 (file)
@@ -9,12 +9,16 @@ CLEANFILES =                  \
        kod-output-blank        \
        kod-output-multiple     \
        kod-output-single       \
+       testLogfile.log         \
+       testLogfile2.log        \
        $(NULL)
 
 DISTCLEANFILES =               \
        kod-output-blank        \
        kod-output-single       \
        kod-output-multiple     \
+       testLogfile.log         \
+       testLogfile2.log        \
        $(NULL)
 
 std_unity_list =                                       \