[asterisk-commits] file: trunk r82231 - in /trunk/main/minimime: ./ tests/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 11 08:10:04 CDT 2007


Author: file
Date: Tue Sep 11 08:10:04 2007
New Revision: 82231

URL: http://svn.digium.com/view/asterisk?view=rev&rev=82231
Log:
(closes issue #10692)
Reported by: snuffy
Patches:
      minivm.diff uploaded by snuffy (license 35)
Instead of using err (which is not available under Solaris) use fdprintf with stderr.

Modified:
    trunk/main/minimime/minimime.c
    trunk/main/minimime/mm_mem.c
    trunk/main/minimime/tests/create.c
    trunk/main/minimime/tests/parse.c

Modified: trunk/main/minimime/minimime.c
URL: http://svn.digium.com/view/asterisk/trunk/main/minimime/minimime.c?view=diff&rev=82231&r1=82230&r2=82231
==============================================================================
--- trunk/main/minimime/minimime.c (original)
+++ trunk/main/minimime/minimime.c Tue Sep 11 08:10:04 2007
@@ -38,7 +38,6 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <getopt.h>
-#include <err.h>
 
 #include "mm.h"
 
@@ -106,20 +105,20 @@
 			i = mm_parse_file(ctx, argv[0], MM_PARSE_LOOSE, 0);
 		} else {
 			if (stat(argv[0], &st) == -1) {
-				err(1, "stat");
+				fprintf(stderr, "INFO: stat");
 			}
 	
 			if ((fd = open(argv[0], O_RDONLY)) == -1) {
-				err(1, "open");
+				fdprintf(stderr, "INFO: open");
 			}
 
 			buf = (char *)malloc(st.st_size);
 			if (buf == NULL) {
-				err(1, "malloc");
+				fdprintf(stderr, "INFO: malloc");
 			}	
 
 			if (read(fd, buf, st.st_size) != st.st_size) {
-				err(1, "read");
+				fdprintf(stderr, "INFO: read");
 			}
 
 			close(fd);

Modified: trunk/main/minimime/mm_mem.c
URL: http://svn.digium.com/view/asterisk/trunk/main/minimime/mm_mem.c?view=diff&rev=82231&r1=82230&r2=82231
==============================================================================
--- trunk/main/minimime/mm_mem.c (original)
+++ trunk/main/minimime/mm_mem.c Tue Sep 11 08:10:04 2007
@@ -37,7 +37,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <err.h>
 #include <assert.h>
 
 #include "mm_internal.h"
@@ -55,11 +54,11 @@
 
 	pointer = malloc(size);
 	if (pointer == NULL)
-		err(1, "malloc");
+		fdprintf(stderr, "INFO: malloc");
 
 	chunk = (struct MM_mem_chunk *)malloc(sizeof(struct MM_mem_chunk));
 	if (chunk == NULL)
-		err(1, "malloc");
+		fdprintf(stderr, "INFO: malloc");
 
 	chunk->address = pointer;
 	chunk->size = size;

Modified: trunk/main/minimime/tests/create.c
URL: http://svn.digium.com/view/asterisk/trunk/main/minimime/tests/create.c?view=diff&rev=82231&r1=82230&r2=82231
==============================================================================
--- trunk/main/minimime/tests/create.c (original)
+++ trunk/main/minimime/tests/create.c Tue Sep 11 08:10:04 2007
@@ -40,7 +40,6 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <getopt.h>
-#include <err.h>
 
 #include "mm.h"
 

Modified: trunk/main/minimime/tests/parse.c
URL: http://svn.digium.com/view/asterisk/trunk/main/minimime/tests/parse.c?view=diff&rev=82231&r1=82230&r2=82231
==============================================================================
--- trunk/main/minimime/tests/parse.c (original)
+++ trunk/main/minimime/tests/parse.c Tue Sep 11 08:10:04 2007
@@ -40,7 +40,6 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <getopt.h>
-#include <err.h>
 
 #include "mm.h"
 




More information about the asterisk-commits mailing list