mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 18:08:53 +00:00
Use INTEGER macro.
This makes the code match the example at: https://github.com/facebook/osquery/wiki/creating-a-new-table
This commit is contained in:
parent
093c857aea
commit
c764226b77
@ -2,8 +2,6 @@
|
||||
|
||||
#include <ctime>
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "osquery/database.h"
|
||||
|
||||
namespace osquery {
|
||||
@ -15,9 +13,9 @@ QueryData genTime() {
|
||||
Row r;
|
||||
time_t _time = time(0);
|
||||
struct tm* now = localtime(&_time);
|
||||
r["hour"] = boost::lexical_cast<std::string>(now->tm_hour);
|
||||
r["minutes"] = boost::lexical_cast<std::string>(now->tm_min);
|
||||
r["seconds"] = boost::lexical_cast<std::string>(now->tm_sec);
|
||||
r["hour"] = INTEGER(now->tm_hour);
|
||||
r["minutes"] = INTEGER(now->tm_min);
|
||||
r["seconds"] = INTEGER(now->tm_sec);
|
||||
QueryData results;
|
||||
for (int i = 0; i < kNumCols; ++i) {
|
||||
results.push_back(r);
|
||||
|
Loading…
Reference in New Issue
Block a user