summaryrefslogtreecommitdiff
path: root/www/clearsilver/files/patch-util__neo_hdf.c
blob: bcc1edcc2defef28a762f09476005a6b03820f65 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
--- ./util/neo_hdf.c.orig	2007-07-12 03:52:37.000000000 +0200
+++ ./util/neo_hdf.c	2012-04-23 17:53:28.104660092 +0200
@@ -59,7 +59,7 @@
   *hdf = calloc (1, sizeof (HDF));
   if (*hdf == NULL)
   {
-    return nerr_raise (NERR_NOMEM, "Unable to allocate memory for hdf element");
+    return nerr_raise (NERR_NOMEM, "%s", "Unable to allocate memory for hdf element");
   }
 
   (*hdf)->top = top;
@@ -406,7 +406,7 @@
 
   _walk_hdf(hdf, name, &obj);
   if (obj == NULL) 
-    return nerr_raise(NERR_ASSERT, "Unable to set attribute on none existant node");
+    return nerr_raise(NERR_ASSERT, "%s", "Unable to set attribute on none existant node");
 
   if (obj->attr != NULL)
   {
@@ -645,7 +645,7 @@
     char *new_name = (char *) malloc(strlen(hdf->value) + 1 + strlen(name) + 1);
     if (new_name == NULL)
     {
-      return nerr_raise(NERR_NOMEM, "Unable to allocate memory");
+      return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory");
     }
     strcpy(new_name, hdf->value);
     strcat(new_name, ".");
@@ -792,7 +792,7 @@
       char *new_name = (char *) malloc(strlen(hp->value) + strlen(s) + 1);
       if (new_name == NULL)
       {
-        return nerr_raise(NERR_NOMEM, "Unable to allocate memory");
+        return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory");
       }
       strcpy(new_name, hp->value);
       strcat(new_name, s);
@@ -866,7 +866,7 @@
   k = vsprintf_alloc(fmt, ap);
   if (k == NULL)
   {
-    return nerr_raise(NERR_NOMEM, "Unable to allocate memory for format string");
+    return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate memory for format string");
   }
   v = strchr(k, '=');
   if (v == NULL)
@@ -1025,7 +1025,7 @@
     if (copy == NULL)
     {
       _dealloc_hdf_attr(dest);
-      return nerr_raise(NERR_NOMEM, "Unable to allocate copy of HDF_ATTR");
+      return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate copy of HDF_ATTR");
     }
     copy->key = strdup(src->key);
     copy->value = strdup(src->value);
@@ -1033,7 +1033,7 @@
     if ((copy->key == NULL) || (copy->value == NULL))
     {
       _dealloc_hdf_attr(dest);
-      return nerr_raise(NERR_NOMEM, "Unable to allocate copy of HDF_ATTR");
+      return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate copy of HDF_ATTR");
     }
     if (last) {
       last->next = copy;
@@ -1339,7 +1339,7 @@
   if (str.buf == NULL)
   {
     *s = strdup("");
-    if (*s == NULL) return nerr_raise(NERR_NOMEM, "Unable to allocate empty string");
+    if (*s == NULL) return nerr_raise(NERR_NOMEM, "%s", "Unable to allocate empty string");
   }
   else
   {
@@ -1831,7 +1831,7 @@
   string_init(&line);
 
   if (path == NULL) 
-    return nerr_raise(NERR_ASSERT, "Can't read NULL file");
+    return nerr_raise(NERR_ASSERT, "%s", "Can't read NULL file");
 
   if (top->fileload)
   {