diff --git a/contrib/oid2name/oid2name.c b/contrib/oid2name/oid2name.c
index 9169c9fd243b101bf167d581b910718b8c458ae9..1eaa73335c08d17552008e3672e162e3ed4f3486 100644
--- a/contrib/oid2name/oid2name.c
+++ b/contrib/oid2name/oid2name.c
@@ -6,7 +6,6 @@
 
  */
 
-#include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
@@ -316,7 +315,7 @@ void sql_exec_dumpdb(PGconn *conn)
   /* get the oid and database name from the system pg_database table */
   sprintf(todo, "select oid,datname from pg_database");
 
-  sql_exec(conn, todo, NULL);
+  sql_exec(conn, todo, 0);
 }
 
 /* display all tables in whatever db we are connected to.  don't display the
@@ -333,7 +332,7 @@ void sql_exec_dumptable(PGconn *conn, int systables)
   else
     sprintf(todo, "select relfilenode,relname from pg_class where relname not like 'pg_%%' order by relname");
 
-  sql_exec(conn, todo, NULL);
+  sql_exec(conn, todo, 0);
 }
 
 /* display the oid for a given tablename for whatever db we are connected