[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r24072 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r24072 - gnunet/src/util |
Date: |
Fri, 28 Sep 2012 11:32:00 +0200 |
Author: grothoff
Date: 2012-09-28 11:32:00 +0200 (Fri, 28 Sep 2012)
New Revision: 24072
Modified:
gnunet/src/util/disk.c
gnunet/src/util/getopt.c
Log:
-simplify code structure for monkey
Modified: gnunet/src/util/disk.c
===================================================================
--- gnunet/src/util/disk.c 2012-09-28 09:31:47 UTC (rev 24071)
+++ gnunet/src/util/disk.c 2012-09-28 09:32:00 UTC (rev 24072)
@@ -274,9 +274,7 @@
LARGE_INTEGER new_pos;
BOOL b;
- static DWORD t[] = {[GNUNET_DISK_SEEK_SET] = FILE_BEGIN,
- [GNUNET_DISK_SEEK_CUR] = FILE_CURRENT,[GNUNET_DISK_SEEK_END] = FILE_END
- };
+ static DWORD t[] = { FILE_BEGIN, FILE_CURRENT, FILE_END };
li.QuadPart = offset;
b = SetFilePointerEx (h->h, li, &new_pos, t[whence]);
@@ -287,9 +285,7 @@
}
return (OFF_T) new_pos.QuadPart;
#else
- static int t[] = {[GNUNET_DISK_SEEK_SET] = SEEK_SET,
- [GNUNET_DISK_SEEK_CUR] = SEEK_CUR,[GNUNET_DISK_SEEK_END] = SEEK_END
- };
+ static int t[] = { SEEK_SET, SEEK_CUR, SEEK_END };
return lseek (h->fd, offset, t[whence]);
#endif
Modified: gnunet/src/util/getopt.c
===================================================================
--- gnunet/src/util/getopt.c 2012-09-28 09:31:47 UTC (rev 24071)
+++ gnunet/src/util/getopt.c 2012-09-28 09:32:00 UTC (rev 24072)
@@ -351,7 +351,7 @@
return optstring;
}
-
+
/* Scan elements of ARGV (whose length is ARGC) for option characters
given in OPTSTRING.
@@ -767,8 +767,7 @@
else
{
if (GNopterr)
- FPRINTF (stderr, _("\
-%s: option `-W %s' does not allow an argument\n"), argv[0], pfound->name);
+ FPRINTF (stderr, _("%s: option `-W %s' does not allow an
argument\n"), argv[0], pfound->name);
nextchar += strlen (nextchar);
return '?';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r24072 - gnunet/src/util,
gnunet <=