mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Code Cleanup
- Removed the rand/random/srand/srandom calls that are no longer used.
This commit is contained in:
parent
fcfd50bd25
commit
bda3674578
5 changed files with 0 additions and 46 deletions
|
@ -83,8 +83,6 @@ if (READLINE_FOUND)
|
|||
set (TASK_LIBRARIES ${TASK_LIBRARIES} ${READLINE_LIBRARIES})
|
||||
endif (READLINE_FOUND)
|
||||
|
||||
check_function_exists (random HAVE_RANDOM)
|
||||
check_function_exists (srandom HAVE_SRANDOM)
|
||||
check_function_exists (timegm HAVE_TIMEGM)
|
||||
check_function_exists (get_current_dir_name HAVE_GET_CURRENT_DIR_NAME)
|
||||
|
||||
|
|
|
@ -52,12 +52,6 @@
|
|||
/* Found the pthread library */
|
||||
#cmakedefine HAVE_LIBPTHREAD
|
||||
|
||||
/* Found random */
|
||||
#cmakedefine HAVE_RANDOM
|
||||
|
||||
/* Found srandom */
|
||||
#cmakedefine HAVE_SRANDOM
|
||||
|
||||
/* Found tm_gmtoff */
|
||||
#cmakedefine HAVE_TM_GMTOFF
|
||||
|
||||
|
|
|
@ -149,18 +149,6 @@ int CmdDiagnostics::execute (std::string& output)
|
|||
<< " -pthreads"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SRANDOM
|
||||
<< " +srandom"
|
||||
#else
|
||||
<< " -srandom"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_RANDOM
|
||||
<< " +random"
|
||||
#else
|
||||
<< " -random"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBGNUTLS
|
||||
<< " +tls"
|
||||
#else
|
||||
|
|
13
src/main.cpp
13
src/main.cpp
|
@ -41,22 +41,9 @@
|
|||
|
||||
Context context;
|
||||
|
||||
#ifdef HAVE_SRANDOM
|
||||
#define srand(x) srandom(x)
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int argc, const char** argv)
|
||||
{
|
||||
// Set up randomness.
|
||||
#ifdef CYGWIN
|
||||
srand (time (NULL));
|
||||
#else
|
||||
struct timeval tv;
|
||||
gettimeofday (&tv, NULL);
|
||||
srand (tv.tv_usec);
|
||||
#endif
|
||||
|
||||
int status = 0;
|
||||
|
||||
if (argc == 2 && !strcmp (argv[1], "--version"))
|
||||
|
|
|
@ -45,22 +45,9 @@
|
|||
|
||||
Context context;
|
||||
|
||||
#ifdef HAVE_SRANDOM
|
||||
#define srand(x) srandom(x)
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int argc, const char** argv)
|
||||
{
|
||||
// Set up randomness.
|
||||
#ifdef CYGWIN
|
||||
srand (time (NULL));
|
||||
#else
|
||||
struct timeval tv;
|
||||
gettimeofday (&tv, NULL);
|
||||
srand (tv.tv_usec);
|
||||
#endif
|
||||
|
||||
bool read_from_file = false;
|
||||
|
||||
if (argc > 2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue