move variable declarations to the beginning of a block.

Not applicable to previous branches.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Luigi Rizzo
2007-06-28 19:02:31 +00:00
parent 600d737dce
commit ad42dfe1dd
2 changed files with 6 additions and 3 deletions

View File

@@ -512,11 +512,13 @@ static int packsms(unsigned char dcs, unsigned char *base, unsigned int udhl, un
static void packdate(unsigned char *o, time_t w)
{
struct tm t;
int z;
ast_localtime(&w, &t, NULL);
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined( __NetBSD__ ) || defined(__APPLE__)
int z = -t.tm_gmtoff / 60 / 15;
z = -t.tm_gmtoff / 60 / 15;
#else
int z = timezone / 60 / 15;
z = timezone / 60 / 15;
#endif
*o++ = ((t.tm_year % 10) << 4) + (t.tm_year % 100) / 10;
*o++ = (((t.tm_mon + 1) % 10) << 4) + (t.tm_mon + 1) / 10;