summaryrefslogtreecommitdiff
path: root/ip/ip.c
diff options
context:
space:
mode:
Diffstat (limited to 'ip/ip.c')
-rw-r--r--ip/ip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ip/ip.c b/ip/ip.c
index d4fe950..b4de3b3 100644
--- a/ip/ip.c
+++ b/ip/ip.c
@@ -6,12 +6,12 @@
int
main()
{
- char *ra;
+ char *ra = getenv("REMOTE_ADDR");
printf("Content-type: %s\r\n\r\n", "text/plain");
- if ((ra = getenv("REMOTE_ADDR")) != NULL)
- printf("Your IP is: %s\n", ra);
+ if (ra)
+ puts(ra);
return 0;
}