[libpri-commits] russell: trunk r494 - /trunk/pri.c

SVN commits to the libpri project libpri-commits at lists.digium.com
Wed Dec 5 21:44:59 CST 2007


Author: russell
Date: Wed Dec  5 21:44:59 2007
New Revision: 494

URL: http://svn.digium.com/view/libpri?view=rev&rev=494
Log:
Change the table used to hold the default timers to be global and const,
instead of allocating it on the stack each time the function is called.

Modified:
    trunk/pri.c

Modified: trunk/pri.c
URL: http://svn.digium.com/view/libpri/trunk/pri.c?view=diff&rev=494&r1=493&r2=494
==============================================================================
--- trunk/pri.c (original)
+++ trunk/pri.c Wed Dec  5 21:44:59 2007
@@ -81,7 +81,7 @@
 
 static void pri_default_timers(struct pri *pri, int switchtype)
 {
-	int defaulttimers[20][PRI_MAX_TIMERS] = PRI_TIMERS_ALL;
+	static const int defaulttimers[20][PRI_MAX_TIMERS] = PRI_TIMERS_ALL;
 	int x;
 
 	for (x = 0; x<PRI_MAX_TIMERS; x++) {




More information about the libpri-commits mailing list