Projet

Général

Profil

Révision c01ddbb0

IDc01ddbb0c0942d82c979392eed10753d5e17a5de
Parent 50b2baaf
Enfant 4bd77f20

Ajouté par Helmut Grohne il y a presque 13 ans

extract function getenvint to common.c

Voir les différences:

tools/munin-plugins-busybox/common.c
1 1
#include <stdio.h>
2
#include <stdlib.h>
2 3

  
3 4
int writeyes(void) {
4 5
	puts("yes");
......
12 13
		puts("no");
13 14
	return 1;
14 15
}
16

  
17
int getenvint(const char *name, int defvalue) {
18
	const char *value;
19
	value = getenv(name);
20
	if(value == NULL)
21
		return defvalue;
22
	return atoi(value);
23
}

Formats disponibles : Unified diff