aboutsummaryrefslogtreecommitdiff
path: root/src/wydawca.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wydawca.c')
-rw-r--r--src/wydawca.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wydawca.c b/src/wydawca.c
index cc1815b..36aa8b7 100644
--- a/src/wydawca.c
+++ b/src/wydawca.c
@@ -68,13 +68,13 @@ syslog_printer (int prio, const char *fmt, va_list ap)
68 const char *p = mu_syslog_priority_to_string (prio); 68 const char *p = mu_syslog_priority_to_string (prio);
69 size_t size = strlen (p) + 3 + strlen (fmt) + 1; 69 size_t size = strlen (p) + 3 + strlen (fmt) + 1;
70 70
71 if (size > fmtsize) 71 if (size > fmtsize)
72 { 72 {
73 fmtsize = size; 73 fmtsize = size;
74 fmtbuf = x2realloc (fmtbuf, &fmtsize); 74 fmtbuf = grecs_realloc (fmtbuf, fmtsize);
75 } 75 }
76 sprintf (fmtbuf, "[%s] %s", p, fmt); 76 sprintf (fmtbuf, "[%s] %s", p, fmt);
77 fmt = fmtbuf; 77 fmt = fmtbuf;
78 } 78 }
79 79
80#if HAVE_VSYSLOG 80#if HAVE_VSYSLOG
@@ -176,23 +176,23 @@ static const char *
176stat_expand (struct metadef *def, void *data) 176stat_expand (struct metadef *def, void *data)
177{ 177{
178 size_t size = 0; 178 size_t size = 0;
179 def->storage = NULL; 179 def->storage = NULL;
180 if (grecs_asprintf (&def->storage, &size, "%u", 180 if (grecs_asprintf (&def->storage, &size, "%u",
181 wydawca_stat[(int) def->data])) 181 wydawca_stat[(int) def->data]))
182 xalloc_die (); 182 grecs_alloc_die ();
183 def->value = def->storage; 183 def->value = def->storage;
184 return def->value; 184 return def->value;
185} 185}
186 186
187struct metadef * 187struct metadef *
188make_stat_expansion (size_t count) 188make_stat_expansion (size_t count)
189{ 189{
190 int i; 190 int i;
191 struct metadef *def, *p; 191 struct metadef *def, *p;
192 def = xcalloc (MAX_STAT + count + 1, sizeof (def[0])); 192 def = grecs_calloc (MAX_STAT + count + 1, sizeof (def[0]));
193 p = def + count; 193 p = def + count;
194 for (i = 0; i < MAX_STAT; i++, p++) 194 for (i = 0; i < MAX_STAT; i++, p++)
195 { 195 {
196 p->kw = stat_kwname[i]; 196 p->kw = stat_kwname[i];
197 p->value = NULL; 197 p->value = NULL;
198 p->storage = NULL; 198 p->storage = NULL;
@@ -249,13 +249,13 @@ static uid_t *uidv;
249static void 249static void
250collect_uids (int argc, char **argv) 250collect_uids (int argc, char **argv)
251{ 251{
252 int i; 252 int i;
253 253
254 uidc = argc; 254 uidc = argc;
255 uidv = xcalloc (uidc, sizeof (uidv[0])); 255 uidv = grecs_calloc (uidc, sizeof (uidv[0]));
256 for (i = 0; i < argc; i++) 256 for (i = 0; i < argc; i++)
257 { 257 {
258 struct passwd *pw = getpwnam (argv[i]); 258 struct passwd *pw = getpwnam (argv[i]);
259 if (!pw) 259 if (!pw)
260 { 260 {
261 char *p; 261 char *p;

Return to:

Send suggestions and report system problems to the System administrator.