File:  [DVB] / dietlibc / lib / rand.c
Revision 1.5: download - view: text, annotated - select for diffs
Sat Aug 24 23:21:01 2019 UTC (4 years, 9 months ago) by leitner
Branches: MAIN
CVS tags: HEAD
remove a few gcc 10 warnings

#include <stdlib.h>

static unsigned int seed=1;

int rand(void) {
  return rand_r(&seed);
}

void srand(unsigned int i) { seed=i?i:23; }

int random(void) __attribute__((leaf, nothrow, alias("rand")));
void srandom(unsigned int i) __attribute__((leaf, nothrow, alias("srand")));

LinuxTV legacy CVS <linuxtv.org/cvs>