]> granicus.if.org Git - procps-ng/commitdiff
library: fixing stdio.h include position in nsutils.c
authorJaromir Capik <jcapik@redhat.com>
Tue, 26 Aug 2014 13:24:55 +0000 (15:24 +0200)
committerJaromir Capik <jcapik@redhat.com>
Tue, 26 Aug 2014 13:24:55 +0000 (15:24 +0200)
The previous commit removes the stdio_ext.h header,
but the ns_read function calls snprintf that needs
stdio.h and therefore moving the stdio.h include
from the bottom test program to the top line.

lib/nsutils.c

index 5dcd834840f8eabd7c7c39c882b48559a849d546..d1cc6c96abdb8a5b8172119541737fec526940e1 100644 (file)
@@ -1,3 +1,4 @@
+#include <stdio.h>
 #include <errno.h>
 #include <stdlib.h>
 #include <sys/types.h>
@@ -36,7 +37,6 @@ int ns_read(pid_t pid, proc_t *ns_task)
 }
 
 #ifdef TEST_PROGRAM
-#include <stdio.h>
 int main(int argc, char *argv[])
 {
        printf("Hello, World!\n");