sm

sysmgr implemented in C
git clone git://git.ckyln.com/sm
Log | Files | Refs | README | LICENSE

env.c (212B)


      1 #include <stdio.h>
      2 #include <stdlib.h>
      3 
      4 #include "../util.h"
      5 
      6 char*
      7 getenv_fallback(char *name, char *fallback)
      8 {
      9 	if (setenv(name, fallback, 0) == -1) {
     10 		perror(name);
     11 		return NULL;
     12 	}
     13 	return getenv(name);
     14 }