853a31c4bdd8d4475217887b84ea4257c686eb9f galt Tue Aug 11 22:36:34 2015 -0700 trivial cleanup to hgsqlTableDate diff --git src/hg/hgsqlTableDate/hgsqlTableDate.c src/hg/hgsqlTableDate/hgsqlTableDate.c index 568e9cc..5455f6b 100644 --- src/hg/hgsqlTableDate/hgsqlTableDate.c +++ src/hg/hgsqlTableDate/hgsqlTableDate.c @@ -6,47 +6,45 @@ #include "linefile.h" #include "hash.h" #include "options.h" #include "jksql.h" #include "utime.h" #include "hdb.h" void usage() /* Explain usage and exit. */ { errAbort( "hgsqlTableDate - touch file with date from table\n" "usage:\n" " hgsqlTableDate database table file\n" - "options:\n" ); } static struct optionSpec options[] = { {NULL, 0}, }; void hgsqlTableDate(char *database, char *table, char *file) /* hgsqlTableDate - touch file with date from table. */ { struct sqlConnection *conn = hAllocConn(database); time_t tableTime = sqlTableUpdateTime(conn, table); struct utimbuf buf; buf.actime = tableTime; buf.modtime = tableTime; if (utime(file, &buf) < 0) - errAbort("utime failed. %s:%s\n",file, strerror(errno)); } int main(int argc, char *argv[]) /* Process command line. */ { optionInit(&argc, argv, options); if (argc != 4) usage(); hgsqlTableDate(argv[1],argv[2],argv[3]); return 0; }