Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Feb 2014 13:17:11 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r262295 - head/contrib/dma
Message-ID:  <201402211317.s1LDHBF7053421@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Fri Feb 21 13:17:10 2014
New Revision: 262295
URL: http://svnweb.freebsd.org/changeset/base/262295

Log:
  Fix build with gcc

Modified:
  head/contrib/dma/conf.c
  head/contrib/dma/dma.c
  head/contrib/dma/mail.c

Modified: head/contrib/dma/conf.c
==============================================================================
--- head/contrib/dma/conf.c	Fri Feb 21 12:17:27 2014	(r262294)
+++ head/contrib/dma/conf.c	Fri Feb 21 13:17:10 2014	(r262295)
@@ -121,7 +121,7 @@ parse_authfile(const char *path)
 
 		au = calloc(1, sizeof(*au));
 		if (au == NULL)
-			errlog(1, NULL);
+			errlog(1, "calloc failed");
 
 		data = strdup(line);
 		au->login = strsep(&data, "|");

Modified: head/contrib/dma/dma.c
==============================================================================
--- head/contrib/dma/dma.c	Fri Feb 21 12:17:27 2014	(r262294)
+++ head/contrib/dma/dma.c	Fri Feb 21 13:17:10 2014	(r262295)
@@ -464,7 +464,7 @@ main(int argc, char **argv)
 		goto skipopts;
 	} else if (strcmp(argv[0], "newaliases") == 0) {
 		logident_base = "dma";
-		setlogident(NULL);
+		setlogident("%s", logident_base);
 
 		if (read_aliases() != 0)
 			errx(1, "could not parse aliases file `%s'", config.aliases);
@@ -563,7 +563,7 @@ main(int argc, char **argv)
 skipopts:
 	if (logident_base == NULL)
 		logident_base = "dma";
-	setlogident(NULL);
+	setlogident("%s", logident_base);
 
 	act.sa_handler = sighup_handler;
 	act.sa_flags = 0;
@@ -595,7 +595,7 @@ skipopts:
 		errlog(1, "could not parse aliases file `%s'", config.aliases);
 
 	if ((sender = set_from(&queue, sender)) == NULL)
-		errlog(1, NULL);
+		errlog(1, "set_from failed");
 
 	if (newspoolf(&queue) != 0)
 		errlog(1, "can not create temp file in `%s'", config.spooldir);

Modified: head/contrib/dma/mail.c
==============================================================================
--- head/contrib/dma/mail.c	Fri Feb 21 12:17:27 2014	(r262294)
+++ head/contrib/dma/mail.c	Fri Feb 21 13:17:10 2014	(r262295)
@@ -332,7 +332,7 @@ newaddr:
 	ps->pos = 0;
 	addr = strdup(ps->addr);
 	if (addr == NULL)
-		errlog(1, NULL);
+		errlog(1, "strdup failed");
 
 	if (add_recp(queue, addr, EXPAND_WILDCARD) != 0)
 		errlogx(1, "invalid recipient `%s'", addr);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402211317.s1LDHBF7053421>