use va_copy for copying va_list types, not assigning directly which is illegal
This commit is contained in:
parent
1572cfdca6
commit
728931077d
18
x11/xview/config/patches/p-lib_libxview_attr_attr_c
Normal file
18
x11/xview/config/patches/p-lib_libxview_attr_attr_c
Normal file
@ -0,0 +1,18 @@
|
||||
$OpenBSD: p-lib_libxview_attr_attr_c,v 1.1 2004/03/03 09:02:14 pvalchev Exp $
|
||||
--- lib/libxview/attr/attr.c.orig 2004-03-03 01:47:38.000000000 -0700
|
||||
+++ lib/libxview/attr/attr.c 2004-03-03 01:48:36.000000000 -0700
|
||||
@@ -91,11 +91,11 @@ Xv_private Attr_avlist copy_va_to_av( va
|
||||
/* These two variables are used instead of the paramters so that the
|
||||
position in the lists is maintained after a recursive call.
|
||||
*/
|
||||
- valist = valist1;
|
||||
- avlist = avlist1;
|
||||
+ va_copy(valist, valist1);
|
||||
+ va_copy(avlist, avlist1);
|
||||
|
||||
if( !avlist )
|
||||
- avlist = avlist_tmp;
|
||||
+ va_copy(avlist, avlist_tmp);
|
||||
|
||||
if( attr1 )
|
||||
attr = attr1;
|
21
x11/xview/config/patches/p-lib_libxview_base_xv_c
Normal file
21
x11/xview/config/patches/p-lib_libxview_base_xv_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: p-lib_libxview_base_xv_c,v 1.1 2004/03/03 09:02:14 pvalchev Exp $
|
||||
--- lib/libxview/base/xv.c.orig 1993-06-28 23:14:41.000000000 -0600
|
||||
+++ lib/libxview/base/xv.c 2004-03-03 01:49:17.000000000 -0700
|
||||
@@ -556,7 +556,7 @@ va_dcl
|
||||
case XV_KEY_DATA:
|
||||
case XV_IS_SUBTYPE_OF:
|
||||
status = XV_OK;
|
||||
- args = args_save;
|
||||
+ va_copy(args, args_save);
|
||||
result = generic_get(object, &status, (Attr_attribute) attr, args);
|
||||
va_end(args);
|
||||
return result;
|
||||
@@ -575,7 +575,7 @@ va_dcl
|
||||
* Go to the beginning of the varargs list every time to insure each
|
||||
* pkg gets the start of the varargs.
|
||||
*/
|
||||
- args = args_save;
|
||||
+ va_copy(args, args_save);
|
||||
|
||||
/* ask the object to handle the get */
|
||||
result = (*(pkg->get)) (object, &status, (Attr_attribute) attr, args);
|
Loading…
Reference in New Issue
Block a user