Patch for Debian Bug#385695

Aurélien GÉRÔME ag at roxor.cx
Tue Sep 19 17:37:54 EDT 2006


Hi,

Attached is a patch to fix a FTBFS on Alpha architecture as seen on
[1]. It removes an unused va_list which is treated as a pointer. A
va_list should not be treated as such, because it is implemented as
a struct on Alpha.

At first, I fixed it by an #ifdef __alpha__. However, it was ugly.
Then, I looked deeper at the code and it occurs to me this va_list
was *not* used anywhere, so I removed it.

[1] <http://bugs.debian.org/385695>
-- 
 .''`.   Aurélien GÉRÔME
: :'  :
`. `'`   Free Software Developer
  `-     Unix Sys & Net Admin
-------------- next part --------------
#! /bin/sh /usr/share/dpatch/dpatch-run
## 18_remove_unused_va_list.dpatch by Aurélien GÉRÔME <agroxor.cx>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Remove unused va_list.

@DPATCH@
diff -urNad ircd-hybrid-7.2.2~/src/s_user.c ircd-hybrid-7.2.2/src/s_user.c
--- ircd-hybrid-7.2.2~/src/s_user.c	2006-09-19 18:37:13.000000000 +0200
+++ ircd-hybrid-7.2.2/src/s_user.c	2006-09-19 21:13:01.064621246 +0200
@@ -68,7 +68,7 @@
 static void report_and_set_user_flags(struct Client *, const struct AccessItem *);
 static int check_xline(struct Client *);
 static void introduce_client(struct Client *, struct Client *);
-static void *uid_get(va_list);
+static void *uid_get();
 
 /* Used for building up the isupport string,
  * used with init_isupport, add_isupport, delete_isupport
@@ -428,7 +428,7 @@
     const char *id = execute_callback(uid_get_cb, source_p);
 
     while (hash_find_id(id) != NULL)
-      id = uid_get(NULL);
+      id = uid_get();
 
     strlcpy(source_p->id, id, sizeof(source_p->id));
     hash_add_id(source_p);
@@ -1386,12 +1386,12 @@
 /*
  * uid_get
  *
- * inputs       - struct Client *
+ * inputs       - none
  * output       - new UID is returned to caller
  * side effects - new_uid is incremented by one.
  */
 static void *
-uid_get(va_list args)
+uid_get()
 {
   add_one_to_uid(TOTALSIDUID - 1);    /* index from 0 */
   return new_uid;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.ircd-hybrid.org/pipermail/hybrid/attachments/20060919/e6516c22/attachment.pgp>


More information about the hybrid mailing list